From 3647ad6dd02c9fd907f106dab2861186255d75ba Mon Sep 17 00:00:00 2001 From: Eddoursul Date: Tue, 5 Dec 2023 05:41:36 +0100 Subject: [PATCH] Cleared CWScript to avoid dependency on a bunch of Skyrim civil war scripts --- _build/Used Skyrim scripts.txt | 9 +- scripts/cwalliesscript.pex | Bin 10149 -> 0 bytes .../cwcampaignpollformissionacceptscript.pex | Bin 1445 -> 0 bytes scripts/cwcampaignscript.pex | Bin 33756 -> 0 bytes .../cwcatapultoffscreenfirecontrolscript.pex | Bin 2898 -> 0 bytes scripts/cwcatapultscript.pex | Bin 10304 -> 0 bytes scripts/cwreinforcementcontrollerscript.pex | Bin 23773 -> 0 bytes scripts/cwscript.pex | Bin 148887 -> 445 bytes scripts/cwsiegescript.pex | Bin 30719 -> 0 bytes scripts/cwthreatcombatbarksscript.pex | Bin 12677 -> 0 bytes source/scripts/cwalliesscript.psc | 537 -- .../cwcampaignpollformissionacceptscript.psc | 61 - source/scripts/cwcampaignscript.psc | 1627 ----- .../cwcatapultoffscreenfirecontrolscript.psc | 82 - source/scripts/cwcatapultscript.psc | 399 -- .../cwreinforcementcontrollerscript.psc | 1328 ----- source/scripts/cwscript.psc | 5287 ----------------- source/scripts/cwsiegescript.psc | 1596 ----- source/scripts/cwthreatcombatbarksscript.psc | 529 -- 19 files changed, 1 insertion(+), 11454 deletions(-) delete mode 100644 scripts/cwalliesscript.pex delete mode 100644 scripts/cwcampaignpollformissionacceptscript.pex delete mode 100644 scripts/cwcampaignscript.pex delete mode 100644 scripts/cwcatapultoffscreenfirecontrolscript.pex delete mode 100644 scripts/cwcatapultscript.pex delete mode 100644 scripts/cwreinforcementcontrollerscript.pex delete mode 100644 scripts/cwsiegescript.pex delete mode 100644 scripts/cwthreatcombatbarksscript.pex delete mode 100644 source/scripts/cwalliesscript.psc delete mode 100644 source/scripts/cwcampaignpollformissionacceptscript.psc delete mode 100644 source/scripts/cwcampaignscript.psc delete mode 100644 source/scripts/cwcatapultoffscreenfirecontrolscript.psc delete mode 100644 source/scripts/cwcatapultscript.psc delete mode 100644 source/scripts/cwreinforcementcontrollerscript.psc delete mode 100644 source/scripts/cwsiegescript.psc delete mode 100644 source/scripts/cwthreatcombatbarksscript.psc diff --git a/_build/Used Skyrim scripts.txt b/_build/Used Skyrim scripts.txt index 75acdbbb..a0bf3b4a 100644 --- a/_build/Used Skyrim scripts.txt +++ b/_build/Used Skyrim scripts.txt @@ -20,16 +20,9 @@ craftingactivatelinker.* crimeguardsscript.* critterspawn01.* curediseasescript.* -cwalliesscript.* -cwcampaignpollformissionacceptscript.* -cwcampaignscript.* -cwcatapultoffscreenfirecontrolscript.* -cwcatapultscript.* cwcatapultstrikescript.* -cwreinforcementcontrollerscript.* +cwcatapultstrikespawnerscript.* cwscript.* -cwsiegescript.* -cwthreatcombatbarksscript.* darkbrotherhood.* darksanctuarydialoguescript.* darttrap.* diff --git a/scripts/cwalliesscript.pex b/scripts/cwalliesscript.pex deleted file mode 100644 index 6cfe259fc805a2cbd03f29baec6c8d52a8a71ead..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10149 zcmb7IX?#@G6+d@E5)u+f$ifQAl)*{xu755GIu7YB1ZEdx-wzl>|`=$NT&HnHHW-{@Y=H$+tbM86ko_o%@=iN8| z-2CGEMG<0zzj$5$g*3Tqb7v}*^ny+COmZ;0bTEih$(EsHDiKiS#?#MTed?yw=k%Ph zCK{!;X=1K0Y>YqE%WlfLS&zz2^|QW2XP@bA^VYeE?QW(so!IE6{J!;m)=OuTZb~jj zRh@}Mm^Vz*V5vLfc{$w9RMHJ->PByCGRS%vC=ajicLVQCH?z&l1XQ;^ z%%-Hb)uXE3%y6%7=Z0x6IG_jMMz7x)&nCBf+!%My%MNAIVEGxU>EV|A9bTd*eTE-* zvq?Wq4Tjn4pXMji>r?J9*6wy;1=ID)?~qa9^yIZ^cT37MY=oGq)_7cNJK`lhrU`LB zok(&+Zi-6!lZk|vrs54lUXZ2QSS%+P(en{dnwatWyo{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eN zZ}uPdU-n6aA}kV#@YBF(5+);+k%^H>k*Y{_WOAe?QX8p@)Z^4tF{)5t8Xk zt%VvnL3_9er(66j*1}6PvQ#6>v{s|mifW`uBh6YEuM^T>tLC(6q+L%f*9hK?q;O0x zagye&(8$ReIYrB?)W|B0bZTU^7Vgr>8okz9&FR)iBb^FVWU`dHX`Ll%sK*jZ=rl{r zq|+_YMQ2!I4xI@vl(iV0WoOpX*>+|Dx~o}q1)8lP8fc>>T4|FdI;a=BP^P1Fj-6?y zb1gBQHrsU;(s`CxMW3+-*3f5>bY*Q3ea_CDK%cidQ|SxV^zrmXODv}IE#crfVSH=E zW5eucHEppoEflvzJ0&bpN1i2?Q=j#qleSu78TDJ!CsWeuG|>fiW#jaMHS`91L2rErm)LPlCtSrQoz(=zZgO%OF%5p7gt!Q7C=>j4$n4)LPNLbm|30vogo{(xOGJ746F^y})QzrW;=xwWzhCeOaIv z7|qIL<4aVFS}WR@*?NJ|tdtvHPSB#(iuPrtUSKpUs&-JQSL0;v(S^!S=Cvrwa#Y~g z7~!N`%WH=u*_BH+=aTbt$%b6AJC|(BCFkanGjhp!n#9F)4}G0G#2vj(oTuyQ8@P+_ zpc^rD6Yy&IdNZTdjII~1NtW|~foBT~bQ*!@3Ja_<0?!u~SYQMW z7Z#Xp1YRgCu+j*;SXkf`Bk)pTftVDKpZH~R5B-q07k}m&@Tb%P z%!B)r5Eu2K-pROrG5r+f^*RdW2nKIZM=?}`s$uj~?hm0RUI&hG?CI0on0MQna7pw4csm(865)$ZQ&T_j)Tx!f+hP# XF@Kc*%rc5`%f?Ue5Hug^1(*E~rQu`- diff --git a/scripts/cwcampaignpollformissionacceptscript.pex b/scripts/cwcampaignpollformissionacceptscript.pex deleted file mode 100644 index 4addcc7dc990948b86677ababd5603c86b639b33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1445 zcma)4-BKJy7(LC-&g}BD>_!p@qS=^05CeuJ8pZM=kU&u?A#NpHTEk3-9c$>`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v!Fod{y2s|7 w==NcBCc1Bilv}iirFk=CG)V*u!<^b4%Nj(-IMF?pl^6ofoc8A7=tTE_0n5NYMgRZ+ diff --git a/scripts/cwcatapultoffscreenfirecontrolscript.pex b/scripts/cwcatapultoffscreenfirecontrolscript.pex deleted file mode 100644 index 5fbc637634542fed3b9722c1d17af60ed060ab9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2898 zcmbVM>r&fB82#iMHWw2vX-F}kK!{xuDCU;Hv@@;Uz+^&!!GM1YX^j;Wtw&my<`McP zeT+UyAEZAzJ-gBp8yhFopAl!j>(SX=|5N|#?_`1u!pDBx7Fz=Xuii= zw_JhBGcI43Mr`goaB$!9DARNuhxs&qeEEUd;*>R5zw> zT4=gv)|fC`0dKKDxGXfeuPQz(6$?w5no#_U`)%KrWKS{h7TfwQEy@Ey`bc{L=D%vjW$;^q3B8Yp|oiYYpDe&^7yX z!vlx15sUIIja{1Spn=`EW?{>^@mUaa(iLTzJr7yO7OLD@oJ(WXdc_jLV<$~3Wa_kE zSYDe^vRW_GC=UOj>t8bmr->%3mgnhvCr`k&O52dRoAR+GAKNrit^e$Ks$ob|Xd(Cc zj32SzMYQkgA|L(n@1Hb;8)i^KUTg`H8l(u$cl2I)({gc4Cs<@u1wdAVoCE>Q&{HZX zGfCPrWsB5n&q>=d^;(g%m8jQNNZU*5wN=u#M!mL9+RD^xo1|@vr0v|=5AGcUS(QQRP-mr_pY7+&-F4>Gi~`h~qj_3TXJsDe#H1yhjAgw13;Y$aF41?`ZxcKH z3OhSW0a$d)k-5VwZ%_d=@ox?YZ~P1ho;8IQ#tmA)H*G+|1*z!uZEO*-MSN9kQO2$i z`(D*8VamEeO9m~g3xf796hKW8PAuU9Dxz;uMpCFPtJ)H3H5_zlXvkKarme%<<| z2kQ6w0sIE#-p4NoesAuZfy1rtqdeSqlU6$}Dw?nMyL<+m-9JV0mw8u>i#7>M4AH-{ MxcAG^Z+P_l4}2+`r~m)} diff --git a/scripts/cwcatapultscript.pex b/scripts/cwcatapultscript.pex deleted file mode 100644 index de1d00b4ee2dcf86e10c7087dc51fe81ddd04f66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10304 zcmcgwX>c6H6@D$P4omVOO9I;%Gd37wY;5mJKD0nUvSnegC8L#mVJt?wv(nhRGn<`} zC2`o;V0?v~93cS$F^4%50|9byRPr-FQk5U6q$-uFRDR`8@-LO*N0RS#&-5NT>|n}z z+uGONuV26S_3Q4}`^E0h|58~&g7BAY8F8t3^X|>2Z{|ibej=H-bN-r~m!#^UQ9G0J zXm;N{yE?lQodespZ;3|fGn!W}4n4KqmY?uV-=bOFuJ0i*HZ)9X-;{7$E-37Y!ttkv)KSmXY7bJR(W&|=Rw^L`>{jybk7 ztc~^a_94ro>Wq@A&RcSpIo^mn)?sHMy2Eltsfp`5UC-uebz{aI4%<4MREIO1v8WM~ zZ#9#U>393h{IKOyWN6fzpa$3Jw1#a*IaUWZlD>VI{jEydc`HR#dCN>qQ1ytNN?8uo zCtW8c=QA@jw|D5EmGt|pw3WAysODy8nC8dhyDc;4I{ofeI4{RlkI5FQHLX6i3eth~va^Y2>@;H+!Wu)ws&MQ(r~3^PCU-hYNdJ|sTG!YWV3D& z8W9t9UP44+!Ifx%ZIf(W!C~s%($zW89XDJVD@NW*8+OVt?W|$?s}0ZcjUg-T<}Jfi zk%xtl!K32b$hs-Z$RgSe+cAdCtVOd+Ag5KG9f_{q&bzxd_s5N$uI>0%-tb)nU(v!C zYE7uV$YuI49EpLs!oVOXp+KW!jE&gI5hG=#ZO8J;Vp}aoJ_stq^gK6dV+W;-G20(8 z%uL3}ad7ZB(>JhZM>8oSmqAPz$>4Z0JQau$L2CLXS)n1_^ zy*WMx%#6|3wY96St7mgp+{l{ac6Kxin0eopSpZ9cy+3AIj$xVbuRO#IFK5A(OkkGL zHJ;1hw88F9=iO|ng|KRh?KO>6HqOc`V^t;28v6ak7CLr03oIAch ze3~ZRd>+A}f{7}zKWIg;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XIAQl|;MX8Hq zJ?rI%e5=bmKLYd|;!ePG7KTxmf}Zp8f`R0j9Mmq4I-$>vx)2-FB=hPoIj4Q&5AXo_ zfeO?JFg~9)-ZmZc^G0JJ#LJH%A|)ih`zU1Q0=Y^**+=TU{KOE1LWaUrk!z|p8-c!u#a_hBwwe8Ru0{~fm@NEFXHJ$19cf1Ew*|(tRLlh+b`yXe*xdm@ua1y zUU1|*XLU$7{Y-51b!cL$sDfc%aUxnhX8a-}kLMDSEAy_4#5S$`rR$Mj)fZP^47fUju-WP8g63DQrccCfB`6YBBhVPYgne$FQ{iQG;bj(yMl-Svx!oQIsNZ<` zpD;je4fPIMy1}h*NPofr1xN>|2&$@#+^(iLKy5doY>ej4=i&ghy<>n1dI0VEwq?S- z4G%(LiclS(b^w6^+xclnssq$^tB`#SP~IlkTx9CPt@0HElue%XmO3n%xq*)R|G(kf z{4N93Z?lR{7BC?EPQ^nP6g!el@)Df>y)7tsphaGe0~If)B-CJoO5NckSoP2e{Q)Gm$SU#2UE5`WW$p`3C5YdjkcyPIRCtVI9<4`M75cwt=(8;TCY0$Sk-|A9N zb;};i_=TM9CZP!^<=L$cRoD$U?x%`lyoQZ6nbJdodt!866%m`-GRKDy+2#DQk?LwC zWBC{&APnxioLd|quq;9$x+GLmOZ9J_ZPN?TlFAj ztp-f$;nSq)>jCjMLQCDYK3jF)5)_wd$I;^+6ETusvgxe65C&guHTN>}I3l zNZ>sNXR*`j$>IL}2A`0^RjF5myKqSkd(I)fD)WkPA8wsuc^L7d#4EzxqlO=yLx8LD zt_b%*35hZ~z*T8igeO}p{fHE<%DNJKo59(0j`^dcE5W~QaMm~l#X18t=HnID(h&)uUt$14^q(DB>(^b diff --git a/scripts/cwsiegescript.pex b/scripts/cwsiegescript.pex deleted file mode 100644 index a80111e7244cc3e3a81e4e46253b53f1eff70861..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30719 zcmc(Hb$}H|@_$!P&jO3P!vaC#tO9#6JR}e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I=w0g~de^$h8qqJBe7mV^ zkfReM;Yahi8hnIv0|60ue}tQbLl7@TxIN7BUQ~E%ObkaB_a7mf5jGFthA|M?jbd5T z84@*7Us+JdUg&PdB8&@Nm?NRw#-l@QqeFwER`h-DmO<^o zeeP6}TLzjZai6;-bP;anacvP}h~MX02GQU$To{f}1`N|(hS+^>&_tEX@M)?B+>gck z5WCL}nt0h|h~4J~47a%qvHRSh4^?VOxXNLO-{%GlpEwNh``m!x zC5It?pBpe7>M+Fba|4El9ftUQu4TZ#5{l0x#qM*18g_OV;`g}$!*wo0>^?VW0_S9W Qu^vjT=Jzhcni#|X1LeQTJ^%m! diff --git a/scripts/cwthreatcombatbarksscript.pex b/scripts/cwthreatcombatbarksscript.pex deleted file mode 100644 index eba08b1abe4b2692e5221520b736f0aa00ef30ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12677 zcmb7J3w)Kul|PerAP-0ggaCSN5!3}F;StCxB?%-10WCzc+wHc!+6A_pJJ8zek%`AgxX4#t#8Fg*WGRVYu*2x^Ucin#eCc}=l5~v zocYf=XJ*cvGvCJ_`|deXTttfSmuMKgo2GU4^$upec)l~UX?;B35zlVStxIH+L-{#F zxdfH1-<(YK=csz^S?6_huj@FsXVtRiW_ph%M~;K$if%8zE+5Z(RN0-$XQWwwPBxS9 za=G4Ya$vyAwkPtLEYP&g@ED!0~z}k9pJ?Wl2HH~0sl^5TVOb<}gT5lkkgUOC~KA-Z=8I0$=&cS$k z!0V^6iA=gbnNMcYuva#i?C0EDSD?DdEKDi~HrJAg_!OME- zgcoPm>)P6SHVt{%WIWXuPo)?Wkgd%mHnMDz!?8*|A?}zUcJ$zYnMMciOQ!oXTZ8z{ zzIm&Yxm+^k^(Fg7OZi6c{H>X6Kh?W|D>9pN(mUA+htCJo?ChKGtLsc<{1FhFX<;wd zr@S0HTN_vu7K{@?M>g5-&&OZ4F1VE`PQW_ST6`pd$T59q<#>gjta&rKe4 z)^pG@Hv``@Sv~f(Mp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c4oEq*M@oVW*En;#=UO6IHtWgMq}Ns=uePu z!P?vY4s1hgNy&c;Ucaq1k}UCCZi(LpNU~-D&~+T81we8SC;*ZxLIIGZ=mH=~$^}4@ zuM2?W(oq0(+h~?R?j;2@?HY|Hxw;h4B-y_JNNzU;Kysfc0FtXt0g#lM0-!ravjkFi z3TTqcQvuNK(U_C_RRK+MqbdNpc{Jvv*cH$u<*finDqjK6Eu-=2*3p3EE?2;u)Y1YV zsh$NuQdo}%LRv$eIMGjQI?I8@=OZZ_!s3l3$aaO<#xPqKW~YQ%e9Q@|!h1oGtq-$H z!Yn?(1i`T|i%%=T-lbvo^f22HW~YVO?l5~om|YfT+runAMg-l!mxmyWk`ZK4(u3@x zFgqj6;?qD7jH_Ib?Fh5e!|X|6w$-qxdzaHYy1eQCfqWNVLD2(|{$&1pF6v?fm$u8$ K59xmgr2h|wJd45r diff --git a/source/scripts/cwalliesscript.psc b/source/scripts/cwalliesscript.psc deleted file mode 100644 index ff61026b..00000000 --- a/source/scripts/cwalliesscript.psc +++ /dev/null @@ -1,537 +0,0 @@ -Scriptname CWAlliesScript extends Quest - -;This script handles adding new allies, and getting allies for use with sieges. - -;To add an ally to be available in future sieges: -;*Use function AddPotentialAlly() -;*Note: - there are optional parameters which allow this ally to show up at sieges in various holds. Make sure you set at least one of these paramters to true or you will never see the ally show up for any battles. - -;To get Allies to show up to sieges: -;1) Register markers for phase1/2/3/4/5 so allies have some place to go if the player isn't nearby call RegisterAllyPhaseMarkers() -- note this is MANDATORY -;2) Call ProcessAlliesForSiege() which finds appropriate allies, disables them, and then and moves them to Phase0Marker -;3) When it's appropriate stage in the siege quest, you then need to call EnableActiveAllies() which enables them causing them to appear at phase0marker. - -;After sieges, to get allies to go home: -;*Call DeactivateAllies() -;*!!! NOTE !!!! This assumes the allies have standard packages that take them home some place. If this is not true, I will need to revisit this system. - -CWScript Property CWs Auto - -ReferenceAlias Property Phase0Marker Auto -ReferenceAlias Property Phase1Marker Auto -ReferenceAlias Property Phase2Marker Auto -ReferenceAlias Property Phase3Marker Auto -ReferenceAlias Property Phase4Marker Auto -ReferenceAlias Property Phase5Marker Auto -ReferenceAlias Property Phase6Marker Auto - -ReferenceAlias Property PotentialAlly1 Auto -ReferenceAlias Property PotentialAlly2 Auto -ReferenceAlias Property PotentialAlly3 Auto -ReferenceAlias Property PotentialAlly4 Auto -ReferenceAlias Property PotentialAlly5 Auto -ReferenceAlias Property PotentialAlly6 Auto -ReferenceAlias Property PotentialAlly7 Auto -ReferenceAlias Property PotentialAlly8 Auto -ReferenceAlias Property PotentialAlly9 Auto -ReferenceAlias Property PotentialAlly10 Auto - -ReferenceAlias Property ActiveAlly1 Auto -ReferenceAlias Property ActiveAlly2 Auto -ReferenceAlias Property ActiveAlly3 Auto -ReferenceAlias Property ActiveAlly4 Auto -ReferenceAlias Property ActiveAlly5 Auto -ReferenceAlias Property ActiveAlly6 Auto -ReferenceAlias Property ActiveAlly7 Auto -ReferenceAlias Property ActiveAlly8 Auto -ReferenceAlias Property ActiveAlly9 Auto -ReferenceAlias Property ActiveAlly10 Auto - -Faction Property CWAlliesHaafingarFaction Auto -Faction Property CWAlliesReachFaction Auto -Faction Property CWAlliesHjaalmarchFaction Auto -Faction Property CWAlliesWhiterunFaction Auto -Faction Property CWAlliesFalkreathFaction Auto -Faction Property CWAlliesPaleFaction Auto -Faction Property CWAlliesWinterholdFaction Auto -Faction Property CWAlliesEastmarchFaction Auto -Faction Property CWAlliesRiftFaction Auto - -Faction Property CWAlliesImperialsOnlyFaction Auto -Faction Property CWAlliesSonsOnlyFaction Auto - - - -Location Property HaafingarHoldLocation Auto -Location Property ReachHoldLocation Auto -Location Property HjaalmarchHoldLocation Auto -Location Property WhiterunHoldLocation Auto -Location Property FalkreathHoldLocation Auto -Location Property PaleHoldLocation Auto -Location Property WinterholdHoldLocation Auto -Location Property EastmarchHoldLocation Auto -Location Property RiftHoldLocation Auto - -function MakeHadvarAndRalofPotentialAllies() - ;we're making them both potential allys when player joins either side, because IsAllowedtoJoinPlayersFaction() should prevent the wrong guy from showing up - -; CWScript.Log("CWAlliesScript", self + "MakeHadvarAndRalofPotentialAllies() calling AddPotentialAlly() for both Hadvar and Ralof") - - AddPotentialAlly( \ - CWs.HadvarRef, \ - AllowedInHaafingar = False, \ - AllowedInReach = True, \ - AllowedInHjaalmarch = True, \ - AllowedInWhiterun = True, \ - AllowedInFalkreath = True, \ - AllowedInPale = True, \ - AllowedInWinterhold = True, \ - AllowedInEastmarch = False, \ - AllowedInRift = True, \ - ImperialsOnly = True, \ - SonsOnly = false \ - ) - - - AddPotentialAlly( \ - CWs.RalofRef, \ - AllowedInHaafingar = False, \ - AllowedInReach = True, \ - AllowedInHjaalmarch = True, \ - AllowedInWhiterun = True, \ - AllowedInFalkreath = True, \ - AllowedInPale = True, \ - AllowedInWinterhold = True, \ - AllowedInEastmarch = False, \ - AllowedInRift = True, \ - ImperialsOnly = False, \ - SonsOnly = True \ - ) - -EndFunction - -function AddPotentialAlly( \ -ObjectReference ReferenceToAdd, \ -Bool AllowedInHaafingar = false, \ -Bool AllowedInReach = false, \ -Bool AllowedInHjaalmarch = false, \ -Bool AllowedInWhiterun = false, \ -Bool AllowedInFalkreath = false, \ -Bool AllowedInPale = false, \ -Bool AllowedInWinterhold = false, \ -Bool AllowedInEastmarch = false, \ -Bool AllowedInRift = false, \ -bool ImperialsOnly = false, \ -bool SonsOnly = false \ -) - -; CWScript.Log("CWAlliesScript", self + "AddPotentialAlly() trying to add " + ReferenceToAdd + "Calling GetFreePotenialAllyAlias()") - - ReferenceAlias AliasToForceInto = GetFreePotentialAllyAlias() - - Actor ActorToAdd = ReferenceToAdd as Actor - - if AliasToForceInto != None -; CWScript.Log("CWAlliesScript", self + "AddPotentialAlly() forcing " + ReferenceToAdd + " into alias " + AliasToForceInto) - AliasToForceInto.ForceRefTo(ReferenceToAdd) - - if AllowedInHaafingar -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesHaafingarFaction) - ActorToAdd.AddToFaction(CWAlliesHaafingarFaction) - EndIf - - if AllowedInReach -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesReachFaction) - ActorToAdd.AddToFaction(CWAlliesReachFaction) - EndIf - - if AllowedInHjaalmarch -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesHjaalmarchFaction) - ActorToAdd.AddToFaction(CWAlliesHjaalmarchFaction) - EndIf - - if AllowedInWhiterun -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesWhiterunFaction) - ActorToAdd.AddToFaction(CWAlliesWhiterunFaction) - EndIf - - if AllowedInFalkreath -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesFalkreathFaction) - ActorToAdd.AddToFaction(CWAlliesFalkreathFaction) - EndIf - - if AllowedInPale -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesPaleFaction) - ActorToAdd.AddToFaction(CWAlliesPaleFaction) - EndIf - - if AllowedInWinterhold -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesWinterholdFaction) - ActorToAdd.AddToFaction(CWAlliesWinterholdFaction) - EndIf - - if AllowedInEastmarch -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesEastmarchFaction) - ActorToAdd.AddToFaction(CWAlliesEastmarchFaction) - EndIf - - if AllowedInRift -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesRiftFaction) - ActorToAdd.AddToFaction(CWAlliesRiftFaction) - EndIf - - if ImperialsOnly -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesImperialsOnlyFaction) - ActorToAdd.AddToFaction(CWAlliesImperialsOnlyFaction) - EndIf - - if SonsOnly -; CWScript.Log("CWAlliesScript", self + "adding " + ReferenceToAdd + " to faction " + CWAlliesSonsOnlyFaction) - ActorToAdd.AddToFaction(CWAlliesSonsOnlyFaction) - EndIf - - Else - ;WARNING WE COULDN'T FIND FREE SLOT!!!! -; CWScript.Log("CWAlliesScript", self + " WARNING: AddPotentialAlly() couldn't find a free slot for the ally.", 2, 1, 1 ) - - EndIf - -EndFunction - - - -ReferenceAlias function GetFreePotentialAllyAlias() - ReferenceAlias AliasToReturn - - if PotentialAlly1.GetReference() == False - AliasToReturn = PotentialAlly1 - - ElseIf PotentialAlly2.GetReference() == False - AliasToReturn = PotentialAlly2 - - ElseIf PotentialAlly3.GetReference() == False - AliasToReturn = PotentialAlly3 - - ElseIf PotentialAlly4.GetReference() == False - AliasToReturn = PotentialAlly4 - - ElseIf PotentialAlly5.GetReference() == False - AliasToReturn = PotentialAlly5 - - ElseIf PotentialAlly6.GetReference() == False - AliasToReturn = PotentialAlly6 - - ElseIf PotentialAlly7.GetReference() == False - AliasToReturn = PotentialAlly7 - - ElseIf PotentialAlly8.GetReference() == False - AliasToReturn = PotentialAlly8 - - ElseIf PotentialAlly9.GetReference() == False - AliasToReturn = PotentialAlly9 - - ElseIf PotentialAlly10.GetReference() == False - AliasToReturn = PotentialAlly10 - - Else - ;RAN OUT OF SLOTS -; CWScript.Log("CWAlliesScript", self + " WARNING: GetFreePotenialAllyAlias() ran out of PotentialAlly Aliases, returning none.", 2, 1, 1 ) - return None - - EndIf - -; CWScript.Log("CWAlliesScript", self + "GetFreePotenialAllyAlias() returning " + AliasToReturn) - - return AliasToReturn - -EndFunction - - - -function RegisterAllyPhaseMarkers(ObjectReference Phase0MarkerRef, ObjectReference Phase1MarkerRef, ObjectReference Phase2MarkerRef, ObjectReference Phase3MarkerRef, ObjectReference Phase4MarkerRef, ObjectReference Phase5MarkerRef, ObjectReference Phase6MarkerRef) -{Called by Siege scripts to register 1 set of phase1/2/3/4/5 markers for all the allies to use for that siege} - -; CWScript.Log("CWAlliesScript", self + "RegisterAllyPhaseMarkers() forcing Refs: " + Phase0MarkerRef + "," + Phase1MarkerRef + ", " + Phase2MarkerRef + ", " + Phase3MarkerRef + ", " + Phase4MarkerRef + ", " + Phase5MarkerRef + ", " + Phase6MarkerRef + " into Phase0/1/2/3/4/5/6Marker Aliases.") - Phase0Marker.ForceRefTo(Phase0MarkerRef) - Phase1Marker.ForceRefTo(Phase1MarkerRef) - Phase2Marker.ForceRefTo(Phase2MarkerRef) - Phase3Marker.ForceRefTo(Phase3MarkerRef) - Phase4Marker.ForceRefTo(Phase4MarkerRef) - Phase5Marker.ForceRefTo(Phase5MarkerRef) - Phase6Marker.ForceRefTo(Phase6MarkerRef) - -EndFunction - -function ProcessAlliesForSiege(Location HoldLocation) -{Called by Siege scripts to find appropriate allies and move them to Phase0Marker} -; CWScript.Log("CWAlliesScript", self + "ProcessAlliesForSiege() for location " + HoldLocation + " will now try to find appropriate allies, move them to Phase1Marker and disable them.") - - ObjectReference Phase0MarkerRef = Phase0Marker.GetReference() - - if Phase0MarkerRef == None -; CWScript.Log("CWAlliesScript", self + " WARNING: ProcessAlliesForSiege() couldn't find a reference in Phase0Marker. Make sure Siege Script calls RegisterAllyPhaseMarkers() before calling ProcessAlliesForSiege()!!! ", 2, 1, 1 ) - Return - EndIf - - TryToProcessAlly(PotentialAlly1, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly2, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly3, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly4, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly5, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly6, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly7, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly8, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly9, HoldLocation, Phase0MarkerRef) - TryToProcessAlly(PotentialAlly10, HoldLocation, Phase0MarkerRef) - -; CWScript.Log("CWAlliesScript", self + "ProcessAlliesForSiege() done processing potential allies.") - -EndFunction - -Function TryToProcessAlly(ReferenceAlias PotentialAlly, Location HoldLocation, ObjectReference Phase0MarkerRef) -; CWScript.Log("CWAlliesScript", self + "TryToProcessAlly() for PotentialAlly Alias:" + PotentialAlly + " for HoldLocation:" + HoldLocation) - - actor CurrentPotentialAlly = TryPromoteToActiveAllyAndReturnActor(PotentialAlly, HoldLocation) - - if CurrentPotentialAlly -; CWScript.Log("CWAlliesScript", self + "TryToProcessAlly() disabling " + CurrentPotentialAlly + " and moving to to " + Phase0MarkerRef + "." ) - CurrentPotentialAlly.Disable() - CurrentPotentialAlly.MoveTo(Phase0MarkerRef) - - Else ;for some reason TryPromoteToActiveAllyAndReturnActor failed to return an actor. This does not mean something broke. There are cases where this is fine (for instance tha actor isn't in the faction that allows him to show up in the hold -; CWScript.Log("CWAlliesScript", self + "TryToProcessAlly() did not get an actor from TryPromoteToActiveAllyAndReturnActor( " + PotentialAlly + " ) so we are ignoring it.") - - EndIf - -EndFunction - -Actor function TryPromoteToActiveAllyAndReturnActor(ReferenceAlias PotentialAllyToPromote, Location HoldLocation) - - Actor ActorToForce = PotentialAllyToPromote.GetActorReference() - ReferenceAlias AliasToForceInto = GetFreeActiveAllyAlias() - - ;check that there is an Actor in PotentialAllyToPromote - if ActorToForce == None -; CWScript.Log("CWAlliesScript", self + " TryPromoteToActiveAllyAndReturnActor() did not find an actor in PotentialAllyToPromote alias: " + PotentialAllyToPromote) - ActorToForce = None ;it's already none, but for consistency and readability I'm setting it here. - - Else - ;Check that Actor is in the correct faction (ie that he is allowed to show up in the HoldLocation) - if IsAllowedInLocation(ActorToForce, HoldLocation) && IsAllowedToJoinPlayersFaction(ActorToForce) - ;Is Allowed in location -; CWScript.Log("CWAlliesScript", self + "TryPromoteToActiveAllyAndReturnActor() found actor" + ActorToForce + " is indeed allowed in location and is allowed to join up with the player's faction." ) - - if AliasToForceInto != None -; CWScript.Log("CWAlliesScript", self + "TryPromoteToActiveAllyAndReturnActor() forcing " + ActorToForce + " into alias " + AliasToForceInto) - AliasToForceInto.ForceRefTo(ActorToForce) - - Else - ;WARNING WE COULDN'T FIND FREE SLOT!!!! -; CWScript.Log("CWAlliesScript", self + " WARNING: TryPromoteToActiveAllyAndReturnActor() couldn't find a free slot for the ally.", 2, 1, 1 ) - ActorToForce = None - - EndIf - - Else ; Is Not Allowed in Location -; CWScript.Log("CWAlliesScript", self + "promoteToActiveAlly() found actor" + ActorToForce + " is not allowed in location(" + HoldLocation + ") OR is not allowed to join player's faction:" + CWs.PlayerAllegiance + "[" + CWs.FactionName(CWs.PlayerAllegiance) +"]") - ActorToForce = None - EndIf - - - Endif - -; CWScript.Log("CWAlliesScript", self + "promoteToActiveAlly() returning " + ActorToForce) - return ActorToForce - -EndFunction - - -bool function IsAllowedInLocation(Actor ActorToCheck, Location HoldLocationToCheck) - - Bool IsAllowed - - if HoldLocationToCheck == HaafingarHoldLocation - if ActorToCheck.IsInFaction(CWAlliesHaafingarFaction) - IsAllowed = True - Else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesHaafingarFaction. Will return false.") - IsAllowed = False - EndIf - - elseif HoldLocationToCheck == ReachHoldLocation - if ActorToCheck.IsInFaction(CWAlliesReachFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesReachFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == HjaalmarchHoldLocation - if ActorToCheck.IsInFaction(CWAlliesHjaalmarchFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesHjaalmarchFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == WhiterunHoldLocation - if ActorToCheck.IsInFaction(CWAlliesWhiterunFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesWhiterunFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == FalkreathHoldLocation - if ActorToCheck.IsInFaction(CWAlliesFalkreathFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesFalkreathFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == PaleHoldLocation - if ActorToCheck.IsInFaction(CWAlliesPaleFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesPaleFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == WinterholdHoldLocation - if ActorToCheck.IsInFaction(CWAlliesWinterholdFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesWinterholdFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == EastmarchHoldLocation - if ActorToCheck.IsInFaction(CWAlliesEastmarchFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesEastmarchFaction. Will return false.") - IsAllowed = False - Endif - - elseif HoldLocationToCheck == RiftHoldLocation - if ActorToCheck.IsInFaction(CWAlliesRiftFaction) - IsAllowed = true - else -; CWScript.Log("CWAlliesScript", self + "IsAllowedInLocation() did not find ActorToCheck" + ActorToCheck + " in CWAlliesRiftFaction. Will return false.") - IsAllowed = False - Endif - - Else -; CWScript.Log("CWAlliesScript", self + " WARNING: IsAllowedInLocation() found an unexpected location for HoldLocationToCheck:" + HoldLocationToCheck, 2, 1, 1 ) - IsAllowed = False - EndIf - - return IsAllowed - -EndFunction - -bool Function IsAllowedToJoinPlayersFaction(Actor ActorToCheck) - - bool returnVal - - if CWs.PlayerAllegiance == CWs.iImperials && ActorToCheck.IsInFaction(CWAlliesSonsOnlyFaction) - -; CWScript.Log("CWAlliesScript", self + "IsAllowedToJoinPlayersFaction(" + ActorToCheck + ") is in CWAlliesSonsOnlyFaction and player Imperial. Will return false.") - - returnVal = False - - elseif CWs.PlayerAllegiance == CWs.iSons && ActorToCheck.IsInFaction(CWAlliesImperialsOnlyFaction) -; CWScript.Log("CWAlliesScript", self + "IsAllowedToJoinPlayersFaction(" + ActorToCheck + ") is in CWAlliesImperialsOnlyFaction and player Sons. Will return false.") - returnVal = False - - Else - returnVal = True - - EndIf - - return returnVal - -EndFunction - - -ReferenceAlias function GetFreeActiveAllyAlias() - ReferenceAlias AliasToReturn - - if ActiveAlly1.GetReference() == False - AliasToReturn = ActiveAlly1 - - ElseIf ActiveAlly2.GetReference() == False - AliasToReturn = ActiveAlly2 - - ElseIf ActiveAlly3.GetReference() == False - AliasToReturn = ActiveAlly3 - - ElseIf ActiveAlly4.GetReference() == False - AliasToReturn = ActiveAlly4 - - ElseIf ActiveAlly5.GetReference() == False - AliasToReturn = ActiveAlly5 - - ElseIf ActiveAlly6.GetReference() == False - AliasToReturn = ActiveAlly6 - - ElseIf ActiveAlly7.GetReference() == False - AliasToReturn = ActiveAlly7 - - ElseIf ActiveAlly8.GetReference() == False - AliasToReturn = ActiveAlly8 - - ElseIf ActiveAlly9.GetReference() == False - AliasToReturn = ActiveAlly9 - - ElseIf ActiveAlly10.GetReference() == False - AliasToReturn = ActiveAlly10 - - Else - ;RAN OUT OF SLOTS -; CWScript.Log("CWAlliesScript", self + " WARNING: GetFreePotenialAllyAlias() ran out of ActiveAlly Aliases, returning none.", 2, 1, 1 ) - return None - - EndIf - -; CWScript.Log("CWAlliesScript", self + "GetFreePotenialAllyAlias() returning " + AliasToReturn) - - return AliasToReturn - -EndFunction - -function EnableActiveAllies() -; CWScript.Log("CWAlliesScript", self + "EnableActiveAllies() calling TryToEnable() on all of the ActiveAllyX aliases.") - ActiveAlly1.TryToEnable() - ActiveAlly2.TryToEnable() - ActiveAlly3.TryToEnable() - ActiveAlly4.TryToEnable() - ActiveAlly5.TryToEnable() - ActiveAlly6.TryToEnable() - ActiveAlly7.TryToEnable() - ActiveAlly8.TryToEnable() - ActiveAlly9.TryToEnable() - ActiveAlly10.TryToEnable() - -; CWScript.Log("CWAlliesScript", self + "EnableActiveAllies() finished trying to enable all the active allies.") -EndFunction - -function DeactivateAllies() -{Called by Siege script when the siege is over and the allies should go home. This assumes the Allies have packages that take them some place. If this is not true, I need to revisit this system.} - -; CWScript.Log("CWAlliesScript", self + "EnableActiveAllies() calling Clear() on all of the ActiveAllyX aliases.") - - ActiveAlly1.Clear() - ActiveAlly2.Clear() - ActiveAlly3.Clear() - ActiveAlly4.Clear() - ActiveAlly5.Clear() - ActiveAlly6.Clear() - ActiveAlly7.Clear() - ActiveAlly8.Clear() - ActiveAlly9.Clear() - ActiveAlly10.Clear() - -EndFunction - diff --git a/source/scripts/cwcampaignpollformissionacceptscript.psc b/source/scripts/cwcampaignpollformissionacceptscript.psc deleted file mode 100644 index 933d323b..00000000 --- a/source/scripts/cwcampaignpollformissionacceptscript.psc +++ /dev/null @@ -1,61 +0,0 @@ -Scriptname CWCampaignPollForMissionAcceptScript extends Quest - - -;## Quests ## -Quest Property CW Auto -Quest Property CWCampaign Auto - -;## Scripts ## -;These will be assigned in the OnInit() block -CWScript Property CWs Auto hidden -CWCampaignScript Property CWCampaignS Auto hidden - - -Event OnInit() - -; CWScript.Log("CWCampaignPollForMissionAcceptScript" , " OnInit()", 0, True, True) - - CWs = CW as CWScript - CWCampaignS = CWCampaign as CWCampaignScript - - registerForUpdate(5) -EndEvent - -auto State NotPolling - Event OnUpdate() -; CWScript.Log("CWCampaignPollForMissionAcceptScript" , " State: 'NotPolling' OnUpdate(), doing nothing." ) - EndEvent - -EndState - -State Polling - Event OnUpdate() -; CWScript.Log("CWCampaignPollForMissionAcceptScript" , " State: 'Polling' OnUpdate(), polling for quest acceptance or GameDaysPassed > NextPhaseDay." ) - - if CWCampaignS.AcceptedMission > 0 -; CWScript.Log("CWCampaignPollForMissionAcceptScript" , " State: 'Polling' See's AcceptedMission > 0, going to State 'NotPolling'" ) - StopPolling() - - Elseif CWs.GameDaysPassed.value > CWCampaignS.NextPhaseDay -; CWScript.Log("CWCampaignPollForMissionAcceptScript" , " State: 'Polling' sees that GameDaysPassed(" + CWs.GameDaysPassed.value + ") > NextPhaseDay(" + CWCampaignS.NextPhaseDay + "), stopping polling, and calling AdvanceCampaignPhase()" ) - StopPolling() - CWCampaignS.AdvanceCampaignPhase() ;this will among other things set AcceptedMission to 0 - - Else -; CWScript.Log("CWCampaignPollForMissionAcceptScript" , " State: 'Polling' sees that GameDaysPassed(" + CWs.GameDaysPassed.value + ") < NextPhaseDay(" + CWCampaignS.NextPhaseDay + "), will keep polling." ) - - EndIf - - EndEvent - -EndState - - -Function StartPolling() - GoToState("Polling") -EndFunction - -Function StopPolling() - GoToState("NotPolling") -EndFunction - diff --git a/source/scripts/cwcampaignscript.psc b/source/scripts/cwcampaignscript.psc deleted file mode 100644 index a0bef51e..00000000 --- a/source/scripts/cwcampaignscript.psc +++ /dev/null @@ -1,1627 +0,0 @@ -Scriptname CWCampaignScript extends Quest Conditional - -;#POINTER TO GLOBAL SHOW DEBUG TRACES -GlobalVariable property debugOn auto conditional ;0 = unset, 1 = set - show warnings -{Pointer to Global CWDebugOn, used to toggle campaign start message} - - -int property initCampaign auto conditional hidden ;0 = unset, 1 = running through initialization quest stages, -1 = finished - -int property costPatrol auto conditional hidden -int property ownerPatrol1 auto conditional hidden -int property ownerPatrol2 auto conditional hidden -int property ownerPatrol3 auto conditional hidden -int property ownerPatrol4 auto conditional hidden -int property ownerPatrol5 auto conditional hidden - -;What type each each offered mission? Used to flavor initial dialog when Field Officer is offering player missions -int property Mission1Type auto conditional hidden -int property Mission2Type auto conditional hidden -int property Mission3Type auto conditional hidden -;0 = un/reset -;100 = Tutorial / Ambush -;1 = attack settlement -;2 = sabotage resource -;3 = intercept courier -;4 = rescue soldier from fort prison -;5 = assassinate enemy field co -;6 = turn coats -;7 = blackmail steward -;8 - recruit a giant -;9 = steal plans -;10 - recruit a warrior ally -;11 - recruit orc ally -;200 - Fort Siege - -;N = TBD - - -;*** Below is for debugging what is changing the properties in script -- note, this will break conditions functions, but I'm leaving it here for future reference. -;int __Mission1Type -;int property Mission1Type -; int function get() -; return __Mission1Type -; endFunction -; function set(int value) -; ; debug.tracestack("CWCampaignScript Mission1Type being set to: " + value) -; __Mission1Type = value -; endFunction -;endProperty - -;int __Mission2Type -;int property Mission2Type -; int function get() -; return __Mission2Type -; endFunction -; function set(int value) -; ; debug.tracestack("CWCampaignScript Mission2Type being set to: " + value) -; __Mission2Type = value -; endFunction -;endProperty - - - -int Property ResolutionMissionType Auto Conditional Hidden -;1 = Attack Minor Hold Capital -;2 = Defend Minor Hold Capital -;3 = Attack Major Hold Capital -;4 = Defend Major Hold Capital - -int property acceptedHooks auto conditional hidden ;0 = un/reset, 1 = player has heard the opening mission hooks (unlocks mission topics) -int property acceptedMission auto conditional hidden ;0 = un/reset, 1 = player has accepted a mission (suppresses other mission topics) - -int Property acceptedTutorialHooks Auto Conditional Hidden ;0 = un/reset, 1 = player has heard the opening mission hooks (unlocks mission topics) - - -int property resolutionPhase auto conditional hidden ; N = at what CWCampaignPhase are we considered to be in the "resolution" phase, meaning the final mission (which can also resolve offscreen if player is absent) - ;Reminder: GLOBAL CWCampaignPhase is the current phase - -int property resolveOffscreen auto conditional hidden ;0 = un/reset, 1 = waiting for CW to resolve offscreen and set this quest's stage 255 to stop it - -int Property currentAttackDelta auto Conditional Hidden - -int attackDeltaMissionBonus ; this variable holds bonus attack delta points earned by completing certain CWMission quests -- see Add/SetAttackDeltaMissionBonus() - -;"timer" variables -float property acceptDays auto conditional hidden ;(set in stage 1) How many days we allow the player to accept a mission before advancing the phase without him -float property nextPhaseDay auto conditional hidden ;At start of each phase, GameDaysPassed + acceptDays, after which we advance the phase -float property missionDays auto conditional hidden ;(set in stage 1) How many days we allow the player to complete an accepted mission before we consider it a failure -int property failedMission auto conditional hidden ;0 = unset, -N = player got dialog about failing mission, N = player just failed a mission of the numeric Mission type and should get dialogue about it (see comment under property "Mission1Type" above -int property completedMission auto conditional hidden ;0 = unset, -N player got dialog about completing mission, N = player just completed a mission of the numeric Mission type and should get dialgoue about it (see comment under property "Mission1Type" above - - - - -int Property MissionAcceptancePollWait auto Hidden ;How long to wait between ticks to poll for MissionAcceptance (see PollForMissionAcceptance()) - -int Property AttackDeltaBonusForKillingCapitalGarrison auto hidden ;how many points to add to the AttackDelta if the player killed all the guards in the capital location -Float Property AttackDeltaGarrisonValueModifierForDestroyingResource auto Hidden ;A multiplier to a garrison's cost when turning that garrison into a CurrentAttackDelta points... when the player destroys a resource, the garrison should contribute less to the attack delta. This is the multiplier that reflects that. Set in OnInit() - - -;## Quests ## -Quest Property CW Auto -{Pointer to CW Quest} - -Quest Property CWMission00 Auto - -Quest Property CWSiege Auto -{Pointer to CWSiegeScript on CWSiege} - -;## Aliases ## -;Pointers to CWCampaign Aliases: - -ReferenceAlias Property CampaignStartMarker auto - -ReferenceAlias property Rikke Auto -ReferenceAlias property Galmar Auto - -ReferenceAlias property GenericFieldCOImperial Auto -ReferenceAlias property GenericFieldCOSons Auto - -ReferenceAlias property FieldCO Auto ;Actual field officer for player's faction (Rikke, or Galmar) -ReferenceAlias property EnemyFieldCO Auto ;Actual field officer for player's enemy (Generic Field Commander Imperial / Sons) - -LocationAlias Property Hold Auto - - -LocationAlias Property Garrison1 Auto -LocationAlias Property Garrison2 Auto -LocationAlias Property Garrison3 Auto -LocationAlias Property Garrison4 Auto - -ReferenceAlias Property Garrison1ResourceObject Auto -ReferenceAlias Property Garrison2ResourceObject Auto -ReferenceAlias Property Garrison3ResourceObject Auto -ReferenceAlias Property Garrison4ResourceObject Auto - -LocationAlias Property Fort Auto - -LocationAlias Property GarrisonDefenderOnly1 Auto -LocationAlias Property GarrisonDefenderOnly2 Auto -LocationAlias Property GarrisonDefenderOnly3 Auto -LocationAlias Property GarrisonDefenderOnly4 Auto -LocationAlias Property GarrisonDefenderOnly5 Auto -LocationAlias Property GarrisonDefenderOnly6 Auto - -ReferenceAlias Property GarrisonDefenderOnly1ResourceObject Auto -ReferenceAlias Property GarrisonDefenderOnly2ResourceObject Auto -ReferenceAlias Property GarrisonDefenderOnly3ResourceObject Auto -ReferenceAlias Property GarrisonDefenderOnly4ResourceObject Auto - - -LocationAlias Property Capital Auto -LocationAlias Property CapitalHQ Auto - -LocationAlias Property CampImperial Auto -LocationAlias Property CampSons Auto - -LocationAlias Property FieldHQ Auto -LocationAlias Property EnemyFieldHQ Auto - -ReferenceAlias Property CampEnableImperial Auto -ReferenceAlias Property CampEnableSons Auto - -ReferenceAlias Property CampImperialLocationCenterMarker Auto -ReferenceAlias Property CampSonsLocationCenterMarker Auto -ReferenceAlias Property CapitalHQMarker Auto - - -LocationAlias Property Patrols Auto - -ReferenceAlias Property PatrolsDefaultEnableImperial Auto -ReferenceAlias Property PatrolsDefaultEnableSons Auto - - -ReferenceAlias Property PatrolsEnableImperial1 Auto -ReferenceAlias Property PatrolsEnableImperial2 Auto -ReferenceAlias Property PatrolsEnableImperial3 Auto -ReferenceAlias Property PatrolsEnableImperial4 Auto -ReferenceAlias Property PatrolsEnableImperial5 Auto - - -ReferenceAlias Property PatrolsEnableSons1 Auto -ReferenceAlias Property PatrolsEnableSons2 Auto -ReferenceAlias Property PatrolsEnableSons3 Auto -ReferenceAlias Property PatrolsEnableSons4 Auto -ReferenceAlias Property PatrolsEnableSons5 Auto - -;# EXTERNAL aliases: -;CWCampaignObj Aliases: -ReferenceAlias Property CWCampaignObjFieldCO Auto -ReferenceAlias Property CWCampaignObjFactionLeader Auto -ReferenceAlias Property CWCampaignObjCampaignStartMarker Auto -LocationAlias Property CWCampaignObjCampaignHold Auto - - -;## Globals ## -GlobalVariable Property GameDaysPassed Auto -GlobalVariable Property CWCampaignPhase Auto -GlobalVariable Property ResourceDestroyedAtStage Auto -GlobalVariable Property CWDebugSkipPurchase Auto ;if == 1, skips purchaing garrisons - -;## Keywords ## -Keyword Property CWOwner Auto -Keyword Property CWCost Auto -Keyword Property CWPurchasedByAttacker Auto - -Keyword Property CWMissionStart Auto -Keyword Property CWResolution01Start Auto ;attack settlement capital resolution mission -Keyword Property CWResolution02Start Auto ;defend settlement capital resolution mission -Keyword Property CWMissionTutorialStart Auto -Keyword Property CWSiegeStart Auto ;used to start siege attack and defend quests for cities - - -Keyword Property LocTypeCity Auto -Keyword Property LocTypeHabitation Auto - -;## Location Ref Types ## -LocationRefType Property CWSoldier Auto -LocationRefType Property CWPatrolDefault Auto -LocationRefType Property CWPatrol1 Auto -LocationRefType Property CWPatrol2 Auto -LocationRefType Property CWPatrol3 Auto -LocationRefType Property CWPatrol4 Auto -LocationRefType Property CWPatrol5 Auto - - - -;## Object References ## -ObjectReference Property CWMission1Ref Auto ;Passed in to SendStoryEvent when generating mission quests as a way to identify which mission # -ObjectReference Property CWMission2Ref Auto ;Passed in to SendStoryEvent when generating mission quests as a way to identify which mission # -ObjectReference Property CWMission3Ref Auto ;Passed in to SendStoryEvent when generating mission quests as a way to identify which mission # - -;## Activators ## - -;*** !! *** !! *** !! these are now just forms, and will be set with Game.GetForm(HEX ID) function rather than being pointed at in the editor. As soon as we get Activator objects in Papyrus, this need to change to point directly at the activators -Form Property ResourceObjectFarm auto ;*** !!! TEMPORARILY SET IN OnInit() event using GetForm().... REMOVE THAT FROM THE OnInit() event -Form Property ResourceObjectMill auto ;*** !!! TEMPORARILY SET IN OnInit() event using GetForm().... REMOVE THAT FROM THE OnInit() event -Form Property ResourceObjectMine auto ;*** !!! TEMPORARILY SET IN OnInit() event using GetForm().... REMOVE THAT FROM THE OnInit() event - - -;## Scripts ## -;These will be assigned in the OnInit() block -CWScript Property CWs Auto hidden - - -;# SetOwner() Location Variables -- these should be arrays, consider converting when we get arrays implemented in the language -;Variables for holding locations that are purchased so we can pass them all to CWScript SetOwner() -Location PurchasedLocationImperial1 -Location PurchasedLocationImperial2 -Location PurchasedLocationImperial3 -Location PurchasedLocationImperial4 -Location PurchasedLocationImperial5 -Location PurchasedLocationImperial6 -Location PurchasedLocationImperial7 -Location PurchasedLocationImperial8 -Location PurchasedLocationImperial9 -Location PurchasedLocationImperial10 -Location PurchasedLocationImperial11 -Location PurchasedLocationImperial12 -Location PurchasedLocationImperial13 -Location PurchasedLocationImperial14 -Location PurchasedLocationImperial15 -Location PurchasedLocationImperial16 -Location PurchasedLocationImperial17 -Location PurchasedLocationImperial18 -Location PurchasedLocationImperial19 -Location PurchasedLocationImperial20 - - -Location PurchasedLocationSons1 -Location PurchasedLocationSons2 -Location PurchasedLocationSons3 -Location PurchasedLocationSons4 -Location PurchasedLocationSons5 -Location PurchasedLocationSons6 -Location PurchasedLocationSons7 -Location PurchasedLocationSons8 -Location PurchasedLocationSons9 -Location PurchasedLocationSons10 -Location PurchasedLocationSons11 -Location PurchasedLocationSons12 -Location PurchasedLocationSons13 -Location PurchasedLocationSons14 -Location PurchasedLocationSons15 -Location PurchasedLocationSons16 -Location PurchasedLocationSons17 -Location PurchasedLocationSons18 -Location PurchasedLocationSons19 -Location PurchasedLocationSons20 - -Location PurchasedLocationBothFactions1 -Location PurchasedLocationBothFactions2 -Location PurchasedLocationBothFactions3 -Location PurchasedLocationBothFactions4 -Location PurchasedLocationBothFactions5 -Location PurchasedLocationBothFactions6 -Location PurchasedLocationBothFactions7 -Location PurchasedLocationBothFactions8 - - - -Event OnInit() - CWs = CW as CWScript - -; CWScript.Log("CWCampaignScript", " OnInit() setting default property values.", 0, True, True) - - AcceptDays = 5 - MissionDays = 2 - ResolutionPhase = 4 - - MissionAcceptancePollWait = 5 ;wait this many seconds inside the while loop in PollForMissionAcceptance() function - - AttackDeltaBonusForKillingCapitalGarrison = 2 - AttackDeltaGarrisonValueModifierForDestroyingResource = 0.50 ;destroying the resource object at a garrison halves it value - - - - ;*** !!! *** !!! TEMPORARY HACK UNTIL WE GET ACTIVATORS IN AS OBJECT TYPES -- these should be set in editor - ResourceObjectFarm = Game.GetForm(0X0001DA07) ;**** !!!! **** !!!!! THIS IS TEMPORARY WORK AROUND UNTIL WE GET ACTIVATOR OBJECTS IN PAPYRUS -- when that happens this property will be set in the editor in the CWCampaign quest - ResourceObjectMill = Game.GetForm(0X0001DA0C) ;**** !!!! **** !!!!! THIS IS TEMPORARY WORK AROUND UNTIL WE GET ACTIVATOR OBJECTS IN PAPYRUS -- when that happens this property will be set in the editor in the CWCampaign quest - ResourceObjectMine = Game.GetForm(0X0001DA0D) ;**** !!!! **** !!!!! THIS IS TEMPORARY WORK AROUND UNTIL WE GET ACTIVATOR OBJECTS IN PAPYRUS -- when that happens this property will be set in the editor in the CWCampaign quest - ;*** !!! *** !!! - -EndEvent - - -Function ResetCampaign() - -; CWScript.Log("CWCampaignScript", " ResetCampaign() resetting property values.") - Mission1Type = 0 - Mission2Type = 0 - Mission3Type = 0 - - acceptedHooks = 0 - acceptedMission = 0 - - completedMission = 0 - failedMission = 0 - - ownerPatrol1 = 0 - ownerPatrol2 = 0 - ownerPatrol3 = 0 - ownerPatrol4 = 0 - ownerPatrol5 = 0 - - unsetPurchasedLocations() - - attackDeltaMissionBonus = 0 - - nextPhaseDay = GameDaysPassed.value + acceptDays ;init value (note this is immediately updated again in stage 150, that's fine.) - - CWCampaignPhase.value = 0 ;reset global (note this is immediately incremented to 1 by stage 150) - resolveOffscreen = 0 ;reset variable - -EndFunction - -Function PurchaseGarrisons() -{Depending on the CW.PurchaseDelta assign various garrisons and patrols to the attacker and defender.} - - ;If PurchaseDelta is > 0 it means the attackers have the advantage and can purchase additional garrisons and patrols, if the PurchaseDelta < 0 it means the defenders have the advantage and have all the garrisons and can purchase additional patrols - -; CWScript.Log("CWCampaignScript", " PurchaseGarrisons() begining to purchase garrisons. Starting PurchaseDelta = " + CWs.PurchaseDelta) - - if CWDebugSkipPurchase.value == 1 -; CWScript.Log("CWCampaignScript", ": CWDebugSkipPurchase == 1, we are skipping call to PurchaseGarrison()", 1) - return - EndIf - - unsetPurchasedLocations() ;### used with CallSetOwnerForPurchasedLocations() -- this would be easier if we had arrays - - - ;## 4-16-2010 -- jduvall - ;NOTE: Purchasing used to happen before resetting the defender only, camps, and patrols... I don't think there was any particular reason to do this, and since things go a little faster if the defender only stuff goes first because it includes the capital which takes the longest to process, I am now putting it first through the SetOwner() switchboard, it'll process its stuff while other garrisons are also being processed - ;Hopefully this doesn't break anythingm if it does just but the "reset" stuff back below the "Purchased" stuff - ;## ----------------------------- - - ;"Purchased" THINGS THAT DON'T GET PURCHASED WITH ATTACK DELTA -- everything gets put in PurchasedLocationXXXn variables simulating an array -- see CallSetOwnerForPurchasedLocations() - ;Reset the defender only garrisons - ResetDefenderOnlyGarrisons() - - ;Reset the camps - ResetCamps() - - ;reset the shared Patrols location - ResetPatrols() - - - ;PURCHASE GARRISONS AND PATROLS -- everything gets put in PurchasedLocationXXXn variables simulating an array -- see CallSetOwnerForPurchasedLocations() - ;Attempt to purchase garrisons - PurchaseGarrisonLocationAlias(Garrison1) - PurchaseGarrisonLocationAlias(Garrison2) - PurchaseGarrisonLocationAlias(Garrison3) - PurchaseGarrisonLocationAlias(Garrison4) - - PurchaseGarrisonLocationAlias(Fort) - - ;Purchase additional patrols if there is any AttackDelta left: see EnablePatrols() call below - ownerPatrol1 = PurchasePatrolAndReturnNewOwner(1) - ownerPatrol2 = PurchasePatrolAndReturnNewOwner(2) - ownerPatrol3 = PurchasePatrolAndReturnNewOwner(3) - ownerPatrol4 = PurchasePatrolAndReturnNewOwner(4) - ownerPatrol5 = PurchasePatrolAndReturnNewOwner(5) - - ;ENABLE THE PURCHASED PATROLS -- not these don't get passed into to SetOwner() via a PurchasedLocationXXXn variable, because these patrols are just turned on/off by toggling xmarkers, see the EnablePatrols() function below. - ;Enable patrols that have been purchased by enabling the proper enable markers - EnablePatrols() - - CallSetOwnerForPurchasedLocations() ;### Calls CWs.SetOwner() for each of the purchased locations -- this would be easier if we had arrays - - -EndFunction - - -Function PurchaseGarrisonLocationAlias(LocationAlias GarrisonAlias) -{Calls PurchaseGarrisonLocation() with the location of the supplied alias, if the alias isn't empty} - Location Loc = GarrisonAlias.Getlocation() - - If Loc != None - PurchaseGarrisonLocation(Loc) - EndIf - -EndFunction - -Function PurchaseGarrisonLocation(Location GarrisonLocation) -{If attacker has enough attack points (ie a large enough positive value in CW.PurchaseDelta) award the garrison ownership to attacker and subtract Purchase Delta, otherwise award to the defender.} - int cost = GarrisonLocation.GetKeywordData(CWCost) as int - int newOwner ;1 = Imperials, 2 = Sons -- will correspond to Attacker and Defender property on CWScript attached to CW quest - - If CWs.PurchaseDelta >= Cost ;award to attacker - newOwner = CWs.Attacker - CWs.PurchaseDelta = (CWs.PurchaseDelta - cost) - GarrisonLocation.SetKeywordData(CWPurchasedByAttacker, 1) -; CWScript.Log("CWCampaignScript", " PurchaseGarrison() purchasing " + GarrisonLocation + " for attacker(" + CWs.FactionName(newOwner) + ") and flagged for reset") - - Else ;award to defender - newOwner = CWs.Defender -; CWScript.Log("CWCampaignScript", " PurchaseGarrison() purchasing " + GarrisonLocation + " for defender(" + CWs.FactionName(newOwner) + ") and flagged for reset") - GarrisonLocation.SetKeywordData(CWPurchasedByAttacker, 0) - ;There is no cost for the defender to purchase a garrison... he owns it by default - - EndIf - - SetPurchasedLocation(GarrisonLocation, NewOwner) - -EndFunction - -Function unsetPurchasedLocations() - PurchasedLocationImperial1 = None - PurchasedLocationImperial2 = None - PurchasedLocationImperial3 = None - PurchasedLocationImperial4 = None - PurchasedLocationImperial5 = None - PurchasedLocationImperial6 = None - PurchasedLocationImperial7 = None - PurchasedLocationImperial8 = None - PurchasedLocationImperial9 = None - PurchasedLocationImperial10 = None - PurchasedLocationImperial11 = None - PurchasedLocationImperial12 = None - PurchasedLocationImperial13 = None - PurchasedLocationImperial14 = None - PurchasedLocationImperial15 = None - PurchasedLocationImperial16 = None - PurchasedLocationImperial17 = None - PurchasedLocationImperial18 = None - PurchasedLocationImperial19 = None - PurchasedLocationImperial20 = None - - PurchasedLocationSons1 = None - PurchasedLocationSons2 = None - PurchasedLocationSons3 = None - PurchasedLocationSons4 = None - PurchasedLocationSons5 = None - PurchasedLocationSons6 = None - PurchasedLocationSons7 = None - PurchasedLocationSons8 = None - PurchasedLocationSons9 = None - PurchasedLocationSons10 = None - PurchasedLocationSons11 = None - PurchasedLocationSons12 = None - PurchasedLocationSons13 = None - PurchasedLocationSons14 = None - PurchasedLocationSons15 = None - PurchasedLocationSons16 = None - PurchasedLocationSons17 = None - PurchasedLocationSons18 = None - PurchasedLocationSons19 = None - PurchasedLocationSons20 = None - - PurchasedLocationBothFactions1 = None - PurchasedLocationBothFactions2 = None - PurchasedLocationBothFactions3 = None - PurchasedLocationBothFactions4 = None - PurchasedLocationBothFactions5 = None - PurchasedLocationBothFactions6 = None - PurchasedLocationBothFactions7 = None - PurchasedLocationBothFactions8 = None -EndFunction - -Function SetPurchasedLocation(Location LocationThatWasPurchased, int OwningFaction) -; CWScript.Log("CWCampaignScript", " SetPurchasedLocation() LocationThatWasPurchased: " + LocationThatWasPurchased + ", OwningFaction:(" + OwningFaction + ")") - - if owningFaction == CWs.iImperials - if !PurchasedLocationImperial1 - PurchasedLocationImperial1 = LocationThatWasPurchased - - elseif !PurchasedLocationImperial2 - PurchasedLocationImperial2 = LocationThatWasPurchased - - elseif !PurchasedLocationImperial3 - PurchasedLocationImperial3 = LocationThatWasPurchased - - elseif !PurchasedLocationImperial4 - PurchasedLocationImperial4 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial5 - PurchasedLocationImperial5 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial6 - PurchasedLocationImperial6 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial7 - PurchasedLocationImperial7 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial8 - PurchasedLocationImperial8 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial9 - PurchasedLocationImperial9 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial10 - PurchasedLocationImperial10 = LocationThatWasPurchased - - Elseif !PurchasedLocationImperial11 - PurchasedLocationImperial11 = LocationThatWasPurchased - - elseif !PurchasedLocationImperial12 - PurchasedLocationImperial12 = LocationThatWasPurchased - - elseif !PurchasedLocationImperial13 - PurchasedLocationImperial13 = LocationThatWasPurchased - - elseif !PurchasedLocationImperial14 - PurchasedLocationImperial14 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial15 - PurchasedLocationImperial15 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial16 - PurchasedLocationImperial16 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial17 - PurchasedLocationImperial17 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial18 - PurchasedLocationImperial18 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial19 - PurchasedLocationImperial19 = LocationThatWasPurchased - - ElseIf !PurchasedLocationImperial20 - PurchasedLocationImperial20 = LocationThatWasPurchased - - Else -; CWScript.Log("CWCampaignScript", " ERROR!!! SetPurchasedLocation() ran out of PurchaseLocationXXXn variables. LocationThatWasPurchased: " + LocationThatWasPurchased + ", OwningFaction: " + OwningFaction, 2 ) - - EndIf - - elseif owningFaction == CWs.iSons - - if !PurchasedLocationSons1 - PurchasedLocationSons1 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons2 - PurchasedLocationSons2 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons3 - PurchasedLocationSons3 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons4 - PurchasedLocationSons4 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons5 - PurchasedLocationSons5 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons6 - PurchasedLocationSons6 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons7 - PurchasedLocationSons7 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons8 - PurchasedLocationSons8 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons9 - PurchasedLocationSons9 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons10 - PurchasedLocationSons10 = LocationThatWasPurchased - - Elseif !PurchasedLocationSons11 - PurchasedLocationSons11 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons12 - PurchasedLocationSons12 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons13 - PurchasedLocationSons13 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons14 - PurchasedLocationSons14 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons15 - PurchasedLocationSons15 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons16 - PurchasedLocationSons16 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons17 - PurchasedLocationSons17 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons18 - PurchasedLocationSons18 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons19 - PurchasedLocationSons19 = LocationThatWasPurchased - - ElseIf !PurchasedLocationSons20 - PurchasedLocationSons20 = LocationThatWasPurchased - - Else -; CWScript.Log("CWCampaignScript", " ERROR!!! SetPurchasedLocation() ran out of PurchaseLocationXXXn variables. LocationThatWasPurchased: " + LocationThatWasPurchased + ", OwningFaction: " + OwningFaction, 2 ) - - EndIf - - ElseIf owningFaction == CWs.iBothFactions - - if !PurchasedLocationBothFactions1 - PurchasedLocationBothFactions1 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions2 - PurchasedLocationBothFactions2 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions3 - PurchasedLocationBothFactions3 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions4 - PurchasedLocationBothFactions4 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions5 - PurchasedLocationBothFactions5 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions6 - PurchasedLocationBothFactions6 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions7 - PurchasedLocationBothFactions7 = LocationThatWasPurchased - - ElseIf !PurchasedLocationBothFactions8 - PurchasedLocationBothFactions8 = LocationThatWasPurchased - - Else -; CWScript.Log("CWCampaignScript", " ERROR!!! SetPurchasedLocation() ran out of PurchaseLocationXXXn variables. LocationThatWasPurchased: " + LocationThatWasPurchased + ", OwningFaction: " + OwningFaction, 2 ) - - EndIf - - - Else -; CWScript.Log("CWCampaignScript", " ERROR!!! SetPurchasedLocation() Recieved an unexpected value for OwningFaction. Expected 1, 2 or 3, got:" + OwningFaction, 2 ) - - EndIf - - -EndFunction - -Function CallSetOwnerForPurchasedLocations() - - ;SetOwner() takes a max of 8 locations, so we call it until we are done with all the locations in our "arrays" - - ;setOwner for Imperial garrisons - if PurchasedLocationImperial1 - CWs.setOwner(PurchasedLocationImperial1, CWs.iImperials, PurchasedLocationImperial2, PurchasedLocationImperial3, PurchasedLocationImperial4, PurchasedLocationImperial5, PurchasedLocationImperial6, PurchasedLocationImperial7, PurchasedLocationImperial8) - EndIf - - if PurchasedLocationImperial9 - CWs.setOwner(PurchasedLocationImperial9, CWs.iImperials, PurchasedLocationImperial10, PurchasedLocationImperial11, PurchasedLocationImperial12, PurchasedLocationImperial13, PurchasedLocationImperial14, PurchasedLocationImperial15, PurchasedLocationImperial16) - EndIf - - if PurchasedLocationImperial17 - CWs.setOwner(PurchasedLocationImperial17, CWs.iImperials, PurchasedLocationImperial18, PurchasedLocationImperial19, PurchasedLocationImperial20) - EndIf - - ;setOwner for Sons garrisons - if PurchasedLocationSons1 - CWs.setOwner(PurchasedLocationSons1, CWs.iSons, PurchasedLocationSons2, PurchasedLocationSons3, PurchasedLocationSons4, PurchasedLocationSons5, PurchasedLocationSons6, PurchasedLocationSons7, PurchasedLocationSons8) - EndIf - - if PurchasedLocationSons9 - CWs.setOwner(PurchasedLocationSons9, CWs.iSons, PurchasedLocationSons10, PurchasedLocationSons11, PurchasedLocationSons12, PurchasedLocationSons13, PurchasedLocationSons14, PurchasedLocationSons15, PurchasedLocationSons16) - EndIf - - if PurchasedLocationSons17 - CWs.setOwner(PurchasedLocationSons17, CWs.iSons, PurchasedLocationSons18, PurchasedLocationSons19, PurchasedLocationSons20) - EndIf - - ;setOwner for garrisons owned by both (the one patrol location) - if PurchasedLocationBothFactions1 - CWs.setOwner(PurchasedLocationBothFactions1, CWs.iBothFactions, PurchasedLocationBothFactions2, PurchasedLocationBothFactions3, PurchasedLocationBothFactions4, PurchasedLocationBothFactions5, PurchasedLocationBothFactions6, PurchasedLocationBothFactions7, PurchasedLocationBothFactions8) - EndIf - -EndFunction - - -Function ResetDefenderOnlyGarrisons() -; CWScript.Log("CWCampaignScript", " ResetDefenderOnlyGarrisons() 'purchasing' aliases Captial & GarrisonDefenderOnly1-6 (if not empty)") - - ResetDefenderOnlyGarrison(1) - ResetDefenderOnlyGarrison(2) - ResetDefenderOnlyGarrison(3) - ResetDefenderOnlyGarrison(4) - ResetDefenderOnlyGarrison(5) - ResetDefenderOnlyGarrison(6) - -; CWScript.Log("CWCampaignScript", " ResetDefenderOnlyGarrisons() calling SetPurchasedLocation() for Capital" + Capital.GetLocation() + " to be owned by defender(" + CWs.FactionName(CWs.Defender) + ").") - SetPurchasedLocation(Capital.GetLocation(), CWs.Defender) - - -EndFunction - -Function ResetDefenderOnlyGarrison(Int GarrisonToReset) -{Calls ReturnLocationForDefenderOnlyGarrison and (if not None) sets the CWOwner keyword data on the location to be -Defender.} - - Location Garrison = ReturnLocationForDefenderOnlyGarrison(GarrisonToReset) - - if Garrison != None -; CWScript.Log("CWCampaignScript", " ResetDefenderOnlyGarrisons() calling SetPurchasedLocation() for GarrisonDefenderOnly" + GarrisonToReset + " to be owned by defender(" + CWs.FactionName(CWs.Defender) + ").") - - SetPurchasedLocation(Garrison, CWs.Defender) - - Else - ;Do nothing - EndIf - -EndFunction - -location Function ReturnLocationForDefenderOnlyGarrison(int GarrisonToGet) -{Refturns the Location of the GarrisonDefenderOnlyX location alias corresponding to the supplied Int} - - if GarrisonToGet == 1 - return GarrisonDefenderOnly1.Getlocation() - - elseif GarrisonToGet == 2 - return GarrisonDefenderOnly2.Getlocation() - - elseif GarrisonToGet == 3 - return GarrisonDefenderOnly3.Getlocation() - - elseif GarrisonToGet == 4 - return GarrisonDefenderOnly4.Getlocation() - - elseif GarrisonToGet == 5 - return GarrisonDefenderOnly5.Getlocation() - - elseif GarrisonToGet == 6 - return GarrisonDefenderOnly6.Getlocation() - else - - EndIf - -EndFunction - - -Function ResetCamps() -{Sets keyword data CWOwner on CampImperial and CampSons location aliases to cause them to reset} - if CWs.iImperials == CWs.Attacker -; CWScript.Log("CWCampaignScript", " ResetCamps() calling SetPurchasedLocation() for CampImperial locaion alias.") - - SetPurchasedLocation(CampImperial.GetLocation(), CWs.iImperials) - -; CWScript.Log("CWCampaignScript", " ResetCamps() disabling CampEnableSons.") - CampEnableSons.GetReference().disable() - - - Else ;Sons are attacking -; CWScript.Log("CWCampaignScript", " ResetCamps() calling SetPurchasedLocation() CampSons locaion alias.") - - SetPurchasedLocation(CampSons.GetLocation(), CWs.iSons) - -; CWScript.Log("CWCampaignScript", " ResetCamps() disabling CampEnableImperial.") - CampEnableImperial.GetReference().disable() - - endif - - -EndFunction - -int Function PurchasePatrolAndReturnNewOwner(int WhichPatrolToPurchase) -{Returns an int corresponding to faction that should own. If there is enough remaining positive or negative points in PurchaseDelta, purchase a patrol for the attacker (if positive) or defender (if negative)} - int cost = CWs.iCostPatrol - int newOwner ;1 = Imperials, 2 = Sons -- will correspond to Attacker and Defender property on CWScript attached to CW quest - - If CWs.PurchaseDelta >= Cost ;award to attacker, decrease the PurchaseDelta toward 0 - newOwner = CWs.Attacker - CWs.PurchaseDelta = (CWs.PurchaseDelta - cost) -; CWScript.Log("CWCampaignScript", " PurchasePatrolAndReturnNewOwner() purchasing Patrol" + WhichPatrolToPurchase + " for Attacker (" + CWs.FactionName(NewOwner) + ") New PurchaseDelta =" + CWs.PurchaseDelta) - - Elseif -(CWs.PurchaseDelta) <= -(Cost) ;award to defender, increase the PurchaseDelta toward 0 - newOwner = CWs.Defender - CWs.PurchaseDelta = (CWs.PurchaseDelta + cost) -; CWScript.Log("CWCampaignScript", " PurchasePatrolAndReturnNewOwner() purchasing Patrol" + WhichPatrolToPurchase + " for Defender (" + CWs.FactionName(NewOwner) + ") New PurchaseDelta =" + CWs.PurchaseDelta) - - Else ;award to no one - newOwner = 0 -; CWScript.Log("CWCampaignScript", " PurchasePatrolAndReturnNewOwner() not purchasing Patrol" + WhichPatrolToPurchase + " for anyone. Not enough PurchaseDelta: " + CWs.PurchaseDelta) - - EndIf - - return newOwner - -EndFunction - -Function ResetPatrols() -; CWScript.Log("CWCampaignScript", " ResetPatrols() calling SetPurchasedLocation(" + Patrols.GetLocation() + ") with owner = 3 (both factions own patrols location).") - - SetPurchasedLocation(Patrols.GetLocation(), CWs.iBothFactions) ;this causes the garrison to reset/change hands, lives in CWScript - -EndFunction - -Function EnablePatrols() - - EnableDefaultPatrols() - - EnablePatrol(1) - EnablePatrol(2) - EnablePatrol(3) - EnablePatrol(4) - EnablePatrol(5) - -EndFunction - -Function EnableDefaultPatrols() - PatrolsDefaultEnableImperial.GetReference().Enable() - PatrolsDefaultEnableSons.GetReference().Enable() - -; CWScript.Log("CWCampaignScript", " EnableDefaultPatrols() enabling ReferenceAliases PatrolsDefaultEnableImperial and PatrolsDefaultEnableSons.") - -EndFunction - -Function EnablePatrol(int WhichPatrolToEnable) -{Calls GetEnableMarkerForPatrol() for patrol supplied as an Int, and then enables it.} - ObjectReference EnableMarker - - EnableMarker = GetEnableMarkerForPatrol(WhichPatrolToEnable) - - If EnableMarker != None - EnableMarker.Enable() -; CWScript.Log("CWCampaignScript", " EnablePatrol() enabling " + EnableMarker) - Else -; CWScript.Log("CWCampaignScript", " EnablePatrol() not enabling the patrol #" + WhichPatrolToEnable + " for either faction. Which should mean that neither own it.") - EndIf - -EndFunction - -ObjectReference Function GetEnableMarkerForPatrol(int WhichPatrol) -{Returns the ObjectReference for patrol supplied as an Int} - if WhichPatrol == 1 - if OwnerPatrol1 == CWs.iImperials - return PatrolsEnableImperial1.GetReference() - elseif OwnerPatrol1 == CWs.iSons - return PatrolsEnableSons1.GetReference() - else - return None - endif - - elseif WhichPatrol == 2 - if OwnerPatrol2 == CWs.iImperials - return PatrolsEnableImperial2.GetReference() - elseif OwnerPatrol2 == CWs.iSons - return PatrolsEnableSons2.GetReference() - else - return None - endif - - elseif WhichPatrol == 3 - if OwnerPatrol3 == CWs.iImperials - return PatrolsEnableImperial3.GetReference() - elseif OwnerPatrol3 == CWs.iSons - return PatrolsEnableSons3.GetReference() - else - return None - endif - - elseif WhichPatrol == 4 - if OwnerPatrol4 == CWs.iImperials - return PatrolsEnableImperial4.GetReference() - elseif OwnerPatrol4 == CWs.iSons - return PatrolsEnableSons4.GetReference() - else - return None - endif - - elseif WhichPatrol == 5 - if OwnerPatrol5 == CWs.iImperials - return PatrolsEnableImperial5.GetReference() - elseif OwnerPatrol5 == CWs.iSons - return PatrolsEnableSons5.GetReference() - else - return None - endif - Else -; CWScript.Log("CWCampaignScript", " GetEnableMarkerForPatrol() expected an Int 1-5, instead got " + WhichPatrol) - return None - EndIf - -EndFunction - - - -Function SetCWCampaignFieldCOAliases() -{Forces named field COs into FieldCO and generic enemy field COs into EnemyFieldCO, enables the EnemyFieldCO and disables the other non-used generic field CO} - - if CWs.playerAllegiance == CWs.iImperials - - if CWs.playerInvolved == 0 -; CWScript.Log("CWCampaignScript", " SetCWCampaignFieldCOAliases() Player Allegience == 1 and PlayerInvolved == 0, so we are Forcing GenericFieldCOImperial into FieldCo, GenericFieldCOSons into EnemyFieldCO, and enabling them both.") - - FieldCO.ForceRefTo(GenericFieldCOImperial.GetReference()) - EnemyFieldCO.ForceRefTo(GenericFieldCOSons.GetReference()) - - GenericFieldCOImperial.GetReference().Enable() - EnemyFieldCO.GetReference().Enable() - - Elseif CWs.playerInvolved == 1 - -; CWScript.Log("CWCampaignScript", " SetCWCampaignFieldCOAliases() is Forcing Rikke into FieldCo, GenericFieldCOSons into EnemyFieldCO, enabling EnemyFieldCO, and disabling GenericFieldCOImperial.") - - FieldCO.ForceRefTo(Rikke.GetReference()) - EnemyFieldCO.ForceRefTo(GenericFieldCOSons.GetReference()) - - EnemyFieldCO.GetReference().Enable() - GenericFieldCOImperial.GetReference().Disable() - - Else -; CWScript.Log("CWCampaignScript", "WARNING: SetCWCampaignFieldCOAliases() expected 0 or 1 for CWScript PlayerInvolved, instead found:" + CWs.playerInvolved, 2) - - - EndIf - - Elseif CWs.playerAllegiance == CWs.iSons - - if CWs.playerInvolved == 0 -; CWScript.Log("CWCampaignScript", " SetCWCampaignFieldCOAliases() playerAllegiance == 2 and PlayerInvolved == 0, so we are Forcing GenericFieldCOSons into FieldCo, GenericFieldCOImperial into EnemyFieldCO, and enabling them both.") - - FieldCO.ForceRefTo(GenericFieldCOSons.GetReference()) - EnemyFieldCO.ForceRefTo(GenericFieldCOImperial.GetReference()) - - GenericFieldCOImperial.GetReference().Enable() - EnemyFieldCO.GetReference().Enable() - - Elseif CWs.playerInvolved == 1 - -; CWScript.Log("CWCampaignScript", " SetCWCampaignFieldCOAliases() is Forcing Galmar into FieldCo, GenericFieldCOImperial into EnemyFieldCO, enabling EnemyFieldCO, and disabling GenericFieldCOSons.") - - FieldCO.ForceRefTo(Galmar.GetReference()) - EnemyFieldCO.ForceRefTo(GenericFieldCOImperial.GetReference()) - - EnemyFieldCO.GetReference().Enable() - GenericFieldCOSons.GetReference().Disable() - - Else -; CWScript.Log("CWCampaignScript", "WARNING: SetCWCampaignFieldCOAliases() expected 0 or 1 for CWScript PlayerInvolved, instead found:" + CWs.playerInvolved, 2) - - EndIf - - Else -; CWScript.Log("CWCampaignScript", "WARNING: SetCWCampaignFieldCOAliases expected playerAllegience to be 1 or 2, got " + CWs.playerAllegiance, 2) - - EndIf - -EndFunction - -Function AdvanceCampaignPhase(int OptionalPhaseToSetTo = -1) -{Called when needing to advance the campaign to the next phase, and start new missions} - - ;* The reason for this weird if / while loop below... - ;Phases advance 'automatically': mission accept timers and mission fail timers expire setting mission quest stages that call AdvanceCampaignPhase() and then shut down. - ;However, this function is also called in dialogue with the FactionLeader the first time the player is joining a campaign to reset the campaign to the first phase (via passing a "1" in for the optional param) - ;It's possible that while in dialogue, the campaign phase could advance automatically and the resolution happens off screen, in the middle of the FactionLeader telling us to go meet the field officer - that'd be really weird. - ;We don't want him to say go join this campaign, and then immediately it fails. - ;So this while loop prevents the campaign from advancing at least until after the player leaves the town with the FactionLeader in it, since the player realizes this is a dynamic system, he'll hopefully forgive that weirdness if the campaign ends soon after leaving. - ;If the campaign is starting fresh (ie the CWCampaignPhase is 0) we don't care if the player is standing right in front of the FactionLeader, otherwise we'd never get start the campaign if the player hangs out in the same town with FactionLeader - - ;* See rationale for this above - if CWCampaignPhase.value != 0 && OptionalPhaseToSetTo == -1 ;ie the default call, not when it's called in dialogue with the faction leader the first time the player is joining a campaign in the civil war - while CWs.AliasFactionLeader.GetReference().getCurrentLocation().IsSameLocation(Game.GetPlayer().getCurrentLocation(), LocTypeHabitation) -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() WAITING -PLAYER NEARBY: in a while loop wait until after player and Faction leader aren't in the same LocTypeHabitation location.", 1) -;*** !!! *** IF WE EVER GET A WAIT MENU, THEN WE NEED TO NOT CARE IF THE PLAYER IS IN THE SAME LOCATION IF HE IS ALSO WAITING - utility.wait(10) - - EndWhile - EndIf - -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() running.") - - if OptionalPhaseToSetTo > 0 - CWCampaignPhase.value = OptionalPhaseToSetTo -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() forced CWCampaignPhase global to " + CWCampaignPhase.value ) - Else - ;Increment the phase - CWCampaignPhase.value += 1 -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() incremented CWCampaignPhase global to " + CWCampaignPhase.value ) - EndIf - - if CWs.debugStartingCampaignPhase != 0 && CWCampaignPhase.value < CWs.debugStartingCampaignPhase - CWCampaignPhase.value = CWs.debugStartingCampaignPhase -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() forcing CWCampaignPhase to debugStartingCampaignPhase " + CWCampaignPhase.value ) - EndIf - - if DebugOn.value == 1 - debug.Notification("CWCampaignPhase: " + CWCampaignPhase.value) - EndIf - - ;Increment the NextPhaseDay - NextPhaseDay = GameDaysPassed.value + AcceptDays -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() set CWCampaignPhase NextPhaseDay to " + NextPhaseDay + " ( = GameDaysPassed(" + GameDaysPassed.value + ") AcceptDays(" + AcceptDays + ")." ) - - ;Reset Mission tracking properties - Mission1Type = 0 - Mission2Type = 0 - Mission3Type = 0 - AcceptedHooks = 0 - AcceptedMission = 0 - - ;set current attack delta - SetCurrentAttackDelta() - - ;Start missions: - StartMissions() - - if DebugOn.value == 1 - debug.MessageBox("CWCampaignScript: Ready to start campaign.") - EndIf - -EndFunction - - - - -Function StartResolutionMission() -{Starts the proper resolution mission, checking if the Capital is a city or not, and whether the player should be attacking or defending.} - - ;start an Attack the Capital Settlement resolution quest - ;createEvent CWResolution01Start zBogusLocation FieldCO CampaignStartMarker - - ;start a Defend the Capital Settlement resolution quest - ;createEvent CWResolution02Start zBogusLocation FieldCO CampaignStartMarker - - If Capital.GetLocation().HasKeyword(LocTypeCity) && CWs.debugTreatCityCapitalsAsTowns == 0 ;capital is a city (note the debugTreatCityCapitalsAsTowns) - - CWSiegeStart.SendStoryEvent(Capital.GetLocation()) ;the story manager handles checking the location, the player's allegiance and who is attacking to start the quests - - ; if Capital.GetLocation() == CWs.WhiterunLocation ;ADD || OTHER CITY HERE -; ; CWScript.Log("CWCampaignScript", " StartResolutionMission() starting attack on Whiterun.") - ; CWSiegeStart.SendStoryEvent(Capital.GetLocation()) ;the story manager handles checking the location, the player's allegiance and who is attacking to start the quests - ; - ; Else ;SOME OTHER NOT YET IMPLEMENTED CITY -; ; CWScript.Log("CWCampaignScript", " StartResolutionMission() needs to start an Attack on a Capital CITY. Will RESOLVE OFFSCREEN.") - ; debug.MessageBox("CWCampaignScript StartResolutionMission() needs to start an Attack on a Capital CITY. RESOLVE OFFSCREEN.") - ; CWs.ResolveOffscreen(GetCurrentAttackDelta()) - ; - ; EndIf - - Else ;capital is not a city - if CWs.playerAllegiance == CWs.Attacker - ;start an Attack the Capital Settlement resolution quest -; CWScript.Log("CWCampaignScript", " StartResolutionMission() starting Resolution01 for " + Capital.Getlocation()) - CWResolution01Start.SendStoryEvent(Capital.Getlocation(), FieldCO.GetReference(), CampaignStartMarker.GetReference()) - - Else - ;start an Defend the Capital Settlement resolution quest -; CWScript.Log("CWCampaignScript", " StartResolutionMission() starting Resolution02 for " + Capital.Getlocation()) - CWResolution02Start.SendStoryEvent(Capital.Getlocation(), FieldCO.GetReference(), CampaignStartMarker.GetReference()) - - EndIf - - EndIf - -EndFunction - - -function setCurrentAttackDelta() - - CurrentAttackDelta = GetCurrentAttackDelta() - -EndFunction - - -int Function GetCurrentAttackDelta() -{Returns the current Attack Delta based on situation affected by players actions on the ground. Garrisons don't provide points if all the soldiers are dead, or half points if a resource object is destroyed, plus any misc modifiers for doing special missions.} - - float myCurrentAttackDelta - -; CWScript.Log("CWCampaignScript", " GetmyCurrentAttackDelta() is running.") - - ;Get points for capital garrison - myCurrentAttackDelta += GetAttackDeltaPointsForCapital(Capital.GetLocation()) - - ;Get points for garrisons and their resource objects --- Detailed note about resource objects: A garrison may have more than one resource object in it... we are only testing against the one that filled the alias. Effectively this means the player must get lucky, or destroy all of the resources to get the bonus. This shouldn't matter greatly. - myCurrentAttackDelta += GetAttackDeltaPointsForDefenderOnlyGarrison(GarrisonDefenderOnly1.GetLocation(), GarrisonDefenderOnly1ResourceObject.GetReference()) - myCurrentAttackDelta += GetAttackDeltaPointsForDefenderOnlyGarrison(GarrisonDefenderOnly2.GetLocation(), GarrisonDefenderOnly2ResourceObject.GetReference()) - myCurrentAttackDelta += GetAttackDeltaPointsForDefenderOnlyGarrison(GarrisonDefenderOnly3.GetLocation(), GarrisonDefenderOnly3ResourceObject.GetReference()) - myCurrentAttackDelta += GetAttackDeltaPointsForDefenderOnlyGarrison(GarrisonDefenderOnly4.GetLocation(), GarrisonDefenderOnly4ResourceObject.GetReference()) - - myCurrentAttackDelta += GetAttackDeltaPointsForGarrison(Garrison1.GetLocation(), Garrison1ResourceObject.GetReference()) - myCurrentAttackDelta += GetAttackDeltaPointsForGarrison(Garrison2.GetLocation(), Garrison2ResourceObject.GetReference()) - myCurrentAttackDelta += GetAttackDeltaPointsForGarrison(Garrison3.GetLocation(), Garrison3ResourceObject.GetReference()) - myCurrentAttackDelta += GetAttackDeltaPointsForGarrison(Garrison4.GetLocation(), Garrison4ResourceObject.GetReference()) - - - ;Get points for Patrols - myCurrentAttackDelta += GetAttackDeltaPointsForPatrols() - - ;Get points for mission bonueses - myCurrentAttackDelta += GetAttackDeltaMissionBonus() - -; CWScript.Log("CWCampaignScript", " GetmyCurrentAttackDelta() is returning myCurrentAttackDelta " + myCurrentAttackDelta + " rounded as int (" + (myCurrentAttackDelta as int) + ") compared to original campaign AttackDelta of " + CWs.AttackDelta) - - return myCurrentAttackDelta as int - -EndFunction - -int Function GetAttackDeltaPointsForCapital(Location CapitalLocation) -{Returns the CurrentAttackDelta points contributed by the capital.} - - ;Note: - ;Since the defender gets the capital garrison for free, in otherwords it's not purchased at the start of the campaign, the defender gets no benefit if the guards are alive. - ;However, if the player killed all the guards there, then we want to give the attacker some bonus points so the player can feel like his actions have had an effect - - If CapitalLocation.GetRefTypeAliveCount(CWSoldier) == 0 -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForCapital() is returning " + AttackDeltaBonusForKillingCapitalGarrison + " points for the CurrentAttackDelta because all the soldiers in the garrison are dead.") - - return AttackDeltaBonusForKillingCapitalGarrison ;set in OnInit() - - else -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForCapital() is returning 0 points for the CurrentAttackDelta because the garrison is intact:" + CapitalLocation ) - return 0 ;There are soldiers alive in the capital, so the attacker is awarded no points - - EndIf - -EndFunction - -float Function GetAttackDeltaPointsForDefenderOnlyGarrison(Location Garrison, ObjectReference ResourceObject) -{Returns the CurrentAttackDelta points contributed by the Garrison and it's ResourceObject.} - ;Note: - ;Since the defender gets the garrison for free, in otherwords it's not purchased at the start of the campaign, the defender gets no benefit if the guards are alive. - ;However, if the player killed all the guards there, or destroyed a resourceObject there, then we want to give the attacker some bonus points so the player can feel like his actions have had an effect - - int BaseGarrisonValue - float GarrisonValue - - If Garrison == None - return 0 - EndIf - - BaseGarrisonValue = Garrison.GetKeywordData(CWCost) as Int - GarrisonValue = BaseGarrisonValue - - if BaseGarrisonValue == CWs.iCostNonContestable -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForDefenderOnlyGarrison() is returning 0 points for the CurrentAttackDelta because Garrison(" + Garrison + ") is Non-Contestable, ie has a CWCost value of:" + BaseGarrisonValue ) - - return 0 - - ElseIf Garrison.GetRefTypeAliveCount(CWSoldier) == 0 -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForDefenderOnlyGarrison() is returning " + BaseGarrisonValue + " points for the CurrentAttackDelta because all the soldiers are dead in Garrison(" + Garrison + ")") - - return BaseGarrisonValue - - ;*** !!! THIS IS SIMILAR BUT NOT IDENTICAL TO ELSEIF IN GetAttackDeltaPointsForGarrison() BELOW - ElseIf (ResourceObject as ResourceObjectScript).IsSabotaged() - - GarrisonValue *= AttackDeltaGarrisonValueModifierForDestroyingResource - -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForDefenderOnlyGarrison() is returning " + GarrisonValue + " points for the CurrentAttackDelta because the resource object is destroyed in the Garrison(" + Garrison + ")") - - return GarrisonValue - - - Else - -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForDefenderOnlyGarrison() is returning 0 points for the CurrentAttackDelta because the garrison is intact:" + Garrison + ")") - return 0 - - EndIf - -EndFunction - -float Function GetAttackDeltaPointsForGarrison(Location Garrison, ObjectReference ResourceObject) -{Returns the CurrentAttackDelta points contributed by the Garrison and it's ResourceObject.} - ;Note: - ;Whoever owns the Garrison gets points for it based on if the resource object is destroyed or not, and if the guards there are alive or not.s so the player can feel like his actions have had an effect - -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForGarrison(Garrison[" + Garrison + "], ResourceObject[" + ResourceObject + "])") - - - int BaseGarrisonValue - float GarrisonValue - - If Garrison == None - return 0 - EndIf - - BaseGarrisonValue = Garrison.GetKeywordData(CWCost) as Int - GarrisonValue = BaseGarrisonValue - - if BaseGarrisonValue == CWs.iCostNonContestable ;Note this shouldn't be the case unless an error has occured setting the cost in the first place, only defender only garrisons should have a CWCost == iCostNonContestable -; CWScript.Log("CWCampaignScript", "WARNING: GetAttackDeltaPointsForGarrison() is returning 0 points for the CurrentAttackDelta because Garrison(" + Garrison + ") UNEXPECTEDLY is Non-Contestable, ie has a CWCost value of:" + BaseGarrisonValue, 2) - - return 0 - - ElseIf Garrison.GetRefTypeAliveCount(CWSoldier) == 0 -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForGarrison() is returning 0 points for the CurrentAttackDelta because all the soldiers are dead in Garrison(" + Garrison + ")") - - return 0 - - ;*** !!! THIS IS SIMILAR BUT NOT IDENTICAL TO ELSEIF IN GetAttackDeltaPointsForDefenderOnlyGarrison() ABOVE - ElseIf (ResourceObject as ResourceObjectScript).IsSabotaged() - - GarrisonValue *= AttackDeltaGarrisonValueModifierForDestroyingResource - -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForGarrison() is returning " + GarrisonValue + " points for the CurrentAttackDelta because the resource object is destroyed in the Garrison(" + Garrison + ")") - - ;DON'T RETURN, to give chance to process the attacker/defender below - - EndIf - - if Math.ABS(Garrison.GetKeywordData(CWOwner) as Int) == CWs.Attacker -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForGarrison() is returning " + GarrisonValue + " points for the CurrentAttackDelta (ie positive value for the Attacker). Garrison:" + Garrison) - - return GarrisonValue - - Else ;owned by Defender - ;only award points if the Defender won it back from the Attacker who purchased it - if Garrison.GetKeywordData(CWPurchasedByAttacker) as Int == 1 -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForGarrison() is returning " + -(GarrisonValue) + " points for the CurrentAttackDelta (ie negative value for the Defender) because he won it back from the Attacker who purchased it. Garrison:" + Garrison) - - return -(GarrisonValue) ;Negative value means in the defender's favor - Else -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForGarrison() is returning 0 points for the CurrentAttackDelta because it is owned by the Defender who did not have to purchase it. Garrison:" + Garrison) - - return 0 - - EndIf - - - - EndIf - -EndFunction - - -int Function GetAttackDeltaPointsForPatrols() -{Returns the sum of the CurrentAttackDelta points contributed by the Patrols for both sides.} - - ;If the patrol is owned, the owner get's points for it if the patrol isn't dead. - - int PatrolValue = CWs.iCostPatrol - int PatrolsAttackDeltaPoints = 0 - - Location PatrolsLoc = Patrols.GetLocation() - - int Attacker = CWs.Attacker - int Defender = CWs.Defender - - if PatrolsLoc.GetRefTypeAliveCount(CWPatrol1) >= 1 - if OwnerPatrol1 == Attacker - PatrolsAttackDeltaPoints += PatrolValue - Elseif OwnerPatrol1 == Defender ;must be explictly owned - PatrolsAttackDeltaPoints += -(PatrolValue) ;negative value means in the defender's favor - EndIf - EndIf - - if PatrolsLoc.GetRefTypeAliveCount(CWPatrol2) >= 1 - if OwnerPatrol2 == Attacker - PatrolsAttackDeltaPoints += PatrolValue - Elseif OwnerPatrol1 == Defender ;must be explictly owned - PatrolsAttackDeltaPoints += -(PatrolValue) ;negative value means in the defender's favor - EndIf - EndIf - - if PatrolsLoc.GetRefTypeAliveCount(CWPatrol3) >= 1 - if OwnerPatrol3 == Attacker - PatrolsAttackDeltaPoints += PatrolValue - Elseif OwnerPatrol1 == Defender ;must be explictly owned - PatrolsAttackDeltaPoints += -(PatrolValue) ;negative value means in the defender's favor - EndIf - EndIf - - if PatrolsLoc.GetRefTypeAliveCount(CWPatrol4) >= 1 - if OwnerPatrol4 == Attacker - PatrolsAttackDeltaPoints += PatrolValue - Elseif OwnerPatrol1 == Defender ;must be explictly owned - PatrolsAttackDeltaPoints += -(PatrolValue) ;negative value means in the defender's favor - EndIf - EndIf - - if PatrolsLoc.GetRefTypeAliveCount(CWPatrol5) >= 1 - if OwnerPatrol5 == Attacker - PatrolsAttackDeltaPoints += PatrolValue - Elseif OwnerPatrol1 == Defender ;must be explictly owned - PatrolsAttackDeltaPoints += -(PatrolValue) ;negative value means in the defender's favor - EndIf - EndIf - -; CWScript.Log("CWCampaignScript", " GetAttackDeltaPointsForPatrols() is returning " + (PatrolsAttackDeltaPoints) + " points for the patrols. If positive it means the Attacker has more living patrols, if negative it means the defender has more living patrols.).") - - return PatrolsAttackDeltaPoints - -EndFunction - -function addAttackDeltaMissionBonus(int valueToAdd) - attackDeltaMissionBonus += valueToAdd -; CWScript.Log("CWCampaignScript", " addAttackDeltaMissionBonus() adding " + valueToAdd + " making AttackDeltaMissionBonus = " + attackDeltaMissionBonus) - -EndFunction - -function subtractAttackDeltaMissionBonus(int valueToSubtract) - attackDeltaMissionBonus += valueToSubtract -; CWScript.Log("CWCampaignScript", " asubtractAttackDeltaMissionBonus() subtracting " + valueToSubtract + " making AttackDeltaMissionBonus = " + attackDeltaMissionBonus) - -EndFunction - -int Function getAttackDeltaMissionBonus() -; CWScript.Log("CWCampaignScript", " getAttackDeltaMissionBonus() returning AttackDeltaMissionBonus: " + attackDeltaMissionBonus) - return attackDeltaMissionBonus - -EndFunction - -int Function GetCountFarms(ReferenceAlias ResourceObject1, ReferenceAlias ResourceObject2, ReferenceAlias ResourceObject3) -{Called by CWMissions. Returns the number of farm resource objects.} - - int count - - If ResourceObject1.GetReference() != None && GetResourceType(ResourceObject1) == 1 - count += 1 - endif - - If ResourceObject2.GetReference() != None && GetResourceType(ResourceObject2) == 1 - count += 1 - endif - - If ResourceObject3.GetReference() != None && GetResourceType(ResourceObject3) == 1 - count += 1 - endif - - return count - -EndFunction - -int Function GetCountMills(ReferenceAlias ResourceObject1, ReferenceAlias ResourceObject2, ReferenceAlias ResourceObject3) -{Called by CWMissions. Returns the number of mill resource objects.} - - int count - - If ResourceObject1.GetReference() != None && GetResourceType(ResourceObject1) == 2 - count += 1 - endif - - If ResourceObject2.GetReference() != None && GetResourceType(ResourceObject2) == 2 - count += 1 - endif - - If ResourceObject3.GetReference() != None && GetResourceType(ResourceObject3) == 2 - count += 1 - endif - - return count - -EndFunction - -int Function GetCountMines(ReferenceAlias ResourceObject1, ReferenceAlias ResourceObject2, ReferenceAlias ResourceObject3) -{Called by CWMissions. Returns the number of mine resource objects.} - - int count - - If ResourceObject1.GetReference() != None && GetResourceType(ResourceObject1) == 3 - count += 1 - endif - - If ResourceObject2.GetReference() != None && GetResourceType(ResourceObject2) == 3 - count += 1 - endif - - If ResourceObject3.GetReference() != None && GetResourceType(ResourceObject3) == 3 - count += 1 - endif - - return count - -EndFunction - -int function GetResourceType(ReferenceAlias ResourceObject) -{Returns an int signifying the resource type: 1 = Farm object, 2 = Mill object, 3 = Mine object} - - ResourceObjectScript ResourceObjectS = ResourceObject.GetReference() as ResourceObjectScript - int type = ResourceObjectS.GetResourceType() - - if type < 1 || type > 3 -; CWScript.Log("CWCampaignScript", " GetResourceType() doesn't know what type to return for ResourceObject, will return 4") - type = 4 - EndIf - -; CWScript.Log("CWCampaignScript", " GetResourceType(" + ResourceObject +") which is objectReference[" + ResourceObject.GetReference() + "]returning type =" + type) - - return type - -EndFunction - - -function ForceFieldHQAliases() -{Forces The capitalHQ, or camp location into the FieldHQ and EnemyFieldHQ aliases based on the player's faction and the attacking faction.} - - int playerAllegiance = CWs.PlayerAllegiance - int Attacker = CWs.Attacker - int ownerContestedHold = CWs.ownerContestedHold - int iImperials = CWs.iImperials - int iSons = CWs.iSons - - - If PlayerAllegiance == ownerContestedHold - FieldHQ.ForceLocationTo(CapitalHQ.GetLocation()) - - ;make the enemy camp as the EnemyFieldHQ - If playerAllegiance == iImperials ;enemy is Sons - EnemyFieldHQ.ForceLocationTo(CampSons.GetLocation()) - - Elseif playerAllegiance == iSons ;enemy is Imperials - EnemyFieldHQ.ForceLocationTo(CampImperial.GetLocation()) - - Else ;unexpected allegiance -; CWScript.Log("CWCampaignScript", "ERROR: ForceFieldHQAliases() expected playerAllegiance to be 1 or 2, instead found " + playerAllegiance, 2) - - EndIf - - - Else ;player's faction is not the owner of the contested hold, so make his camp the fieldHQ and the capital the EnemyFieldHQ - EnemyFieldHQ.ForceLocationTo(CapitalHQ.GetLocation()) - - ;make the player's faction camp as the FieldHQ - If playerAllegiance == iImperials ;player is Sons - FieldHQ.ForceLocationTo(CampImperial.GetLocation()) - - Elseif playerAllegiance == iSons ;player is Imperials - FieldHQ.ForceLocationTo(CampSons.GetLocation()) - - Else ;unexpected allegiance -; CWScript.Log("CWCampaignScript", "ERROR: ForceFieldHQAliases() expected playerAllegiance to be 1 or 2, instead found " + playerAllegiance, 2) - - EndIf - - EndIf - -; CWScript.Log("CWCampaignScript", " ForceFieldHQAliases(): PlayerAllegiance ==" + PlayerAllegiance + ", ownerContestedHold ==" + ownerContestedHold + ", Attacker ==" + Attacker) -; CWScript.Log("CWCampaignScript", " ForceFieldHQAliases(): Set FieldHQ to " + FieldHQ.GetLocation() + ", Set EnemyFieldHQ to " + EnemyFieldHQ.GetLocation()) - -EndFunction - - -Function PlayerJoinsActiveCampaign() -{When player get's involved in a civil war campaign for the first time, we need to roll it back to the begining.} -; CWScript.Log("CWCampaignScript", " PlayerJoinsActiveCampaign() will Call ForceFieldHQAliases(), SetCWCampaignFieldCOAliases, UpdateCWCampaignObjAliases, and AdvanceCampaignPhase(1) ") - ForceFieldHQAliases() - SetCWCampaignFieldCOAliases() - UpdateCWCampaignObjAliases() - AdvanceCampaignPhase(1) ;forces the campaign to "start over" with phase 1 - startTutorialMission() - -EndFunction - -function UpdateCWCampaignObjAliases() -{Forces the aliases in CWCampaignObj quest to have the current references/locations of the related aliases in CWCampaign} -; CWScript.Log("CWCampaignScript", " UpdateCWCampaignObjAliases() forcing CWCampaignObj aliases to match. ") - - CWCampaignObjFieldCO.ForceRefTo(FieldCO.GetReference()) - CWCampaignObjFactionLeader.ForceRefTo(CWs.AliasFactionLeader.GetReference()) - CWCampaignObjCampaignStartMarker.ForceRefTo(CampaignStartMarker.GetReference()) - CWCampaignObjCampaignHold.ForceLocationTo(Hold.GetLocation()) - -EndFunction - -Function startTutorialMission() - int tutorial = CWs.TutorialMissionComplete - -; CWScript.Log("CWCampaignScript", " StartTutorialMission()") - CWMissionTutorialStart.SendStoryEvent(Hold.Getlocation(), CampaignStartMarker.GetReference(), CWMission1Ref) - -EndFunction - -Function stopTutorialMission() - - int secondsWaiting = 0 - - ;This is called by "CWScript FinishCampaign()" - ;In the event that a campaign finishes before the player runs the mission, we need to be sure to completely stop the tutorial mission before the campaign wraps up, so when the next campaign starts we can start the tutorial mission properly. - -; CWScript.Log("CWCampaignScript", " stopTutorialMission() stopping CWMission00") - - CWMission00.stop() - - while CWMission00.IsStopped() == False - Utility.wait(5) - secondsWaiting += 5 -; CWScript.Log("CWCampaignScript", " stopTutorialMission() waiting for CWMission00 to stop. Seconds spent waiting:" + secondsWaiting, 1) - EndWhile - -EndFunction - -;Used by CWCampaignFieldCOScript - see Stage 0 in CWCampaign -ObjectReference Function GetAttackerFieldHQCenterMarker() - - ObjectReference CenterMarkerRef - - if CWs.Attacker == CWs.iImperials - CenterMarkerRef = CampImperialLocationCenterMarker.GetReference() - - elseif CWs.Attacker == CWs.iSons - CenterMarkerRef = CampSonsLocationCenterMarker.GetReference() - - Else -; CWScript.Log("CWCampaignScript", " WARNING: GetAttackerFieldHQCenterMarker() expected CWs.Attacker to be 1 or 2, instead found " + CWs.Attacker, 2, 1, 1) - CenterMarkerRef = none - EndIf - -; CWScript.Log("CWCampaignScript", " GetAttackerFieldHQCenterMarker() returning " + CenterMarkerRef) - - return CenterMarkerRef - -EndFunction - -ObjectReference function GetCapitalHQMarker() - ObjectReference markerRef = CapitalHQMarker.GetReference() - -; CWScript.Log("CWCampaignScript", " GetCapitalHQMarker() returning " + MarkerRef) - - Return MarkerRef - -EndFunction - - -ObjectReference function GetFieldHQMarker() -; CWScript.Log("CWCampaignScript", " GetFieldHQCenterMarker()") - - ObjectReference MarkerRef - - if CWs.PlayerAllegiance == CWs.Attacker - MarkerRef = GetAttackerFieldHQCenterMarker() - - Else - MarkerRef = GetCapitalHQMarker() - - EndIf - -; CWScript.Log("CWCampaignScript", " GetFieldHQMarker() is returning " + MarkerRef) - - Return MarkerRef - -EndFunction - - -ObjectReference function GetEnemyFieldHQMarker() -; CWScript.Log("CWCampaignScript", " GetEnemyFieldHQMarker()") - - ObjectReference MarkerRef - - if CWs.PlayerAllegiance == CWs.Attacker - MarkerRef = GetCapitalHQMarker() ;since player is attacking then the enemy is defending and has the captial hq - - Else - MarkerRef = GetAttackerFieldHQCenterMarker() ;since player is defending then the enemy is attacking - - EndIf - -; CWScript.Log("CWCampaignScript", " GetEnemyFieldHQMarker() is returning " + MarkerRef) - - Return MarkerRef - -EndFunction - - - -;******************************************************************************************************************* -;*** OBSOLETE FUNCTIONS BELOW *** -;******************************************************************************************************************* - -Function StartMissions() - - If CWCampaignPhase.value < ResolutionPhase ;then start normal missions - -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() CWCampaignPhase(" + CWCampaignPhase.value + ") < ResolutionPhase(" + ResolutionPhase + "). Starting Missions.") - - CWMissionStart.SendStoryEvent(Hold.Getlocation(), CampaignStartMarker.GetReference(), CWMission1Ref) - CWMissionStart.SendStoryEvent(Hold.Getlocation(), CampaignStartMarker.GetReference(), CWMission2Ref) - - ;we used to offer three missiosn, now we are only offering two at a time - ;CWMissionStart.SendStoryEvent(Hold.Getlocation(), CampaignStartMarker.GetReference(), CWMission3Ref) - - ((Self as Quest) as CWCampaignPollForMissionAcceptScript).StartPolling() - - ElseIf CWCampaignPhase.value == ResolutionPhase ;then start the resolution Quest - if CWs.TutorialMissionComplete == 0 -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() CWCampaignPhase(" + CWCampaignPhase.value + ") == ResolutionPhase(" + ResolutionPhase + "). Tutorial mission not completed, resolving offscreen.") - CWs.ResolveOffscreen(GetCurrentAttackDelta()) - - Else -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() CWCampaignPhase(" + CWCampaignPhase.value + ") == ResolutionPhase(" + ResolutionPhase + "). Starting Resolution Mission.") - StartResolutionMission() - ((Self as Quest) as CWCampaignPollForMissionAcceptScript).StartPolling() - - EndIf - - Else ; We are trying to advance into a phase after the resolution phase, which means we should resolve the resolution mission off screen -; CWScript.Log("CWCampaignScript", " AdvanceCampaignPhase() CWCampaignPhase(" + CWCampaignPhase.value + ") > ResolutionPhase(" + ResolutionPhase + "). Resolving Resolution Mission OFFSCREEN.") - ((Self as Quest) as CWCampaignPollForMissionAcceptScript).StopPolling() - CWs.ResolveOffscreen(GetCurrentAttackDelta()) - - EndIf - -EndFunction diff --git a/source/scripts/cwcatapultoffscreenfirecontrolscript.psc b/source/scripts/cwcatapultoffscreenfirecontrolscript.psc deleted file mode 100644 index 0715ce3a..00000000 --- a/source/scripts/cwcatapultoffscreenfirecontrolscript.psc +++ /dev/null @@ -1,82 +0,0 @@ -Scriptname CWCatapultOffscreenFireControlScript extends ObjectReference -{Controls the offscreen firing scripting. Set properties on the CWCatapultScript.} - -;Constants -string OffScreenFireModeOff = "OffScreenFireModeOff" -string OffScreenFireModeWaitingToFire = "OffScreenFireModeWaitingToFire" -string OffScreenFireModeBusyFiring = "OffScreenFireModeBusyFiring" - - -auto state OffScreenFireModeOff - Event OnUpdate() -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "OffScreenFireModeOff OnUpdate() doing nothing.") - EndEvent -EndState - -state OffScreenFireModeBusyFiring - Event OnUpdate() -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "OffScreenFireModeBusyFiring OnUpdate() doing nothing.") - EndEvent -EndState - -state OffScreenFireModeWaitingToFire - Event OnUpdate() - GoToState(OffScreenFireModeBusyFiring) - UnregisterForUpdate() - - - CWCatapultScript Cs = (self as ObjectReference) as CWCatapultScript - -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "OffScreenFireModeWaitingToFire OnUpdate() going to state OffScreenFireModeBusyFiring and possibly firing strike if in correct phase ") - - if Cs.UseCWCatapultStrikeSpawners == True - if Cs.UseCWCatapultStrikeSpawners == True ;in case we turned that off during the wait - if Cs.CWBattlePhase.GetValue() == 0 && GetLinkedRef(Cs.CW1) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CW1)) - (GetLinkedRef(Cs.CW1) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - elseif Cs.CWBattlePhase.GetValue() == 1 && GetLinkedRef(Cs.CW1) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CW1)) - (GetLinkedRef(Cs.CW1) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - elseif Cs.CWBattlePhase.GetValue() == 2 && GetLinkedRef(Cs.CW2) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CW2)) - (GetLinkedRef(Cs.CW2) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - elseif Cs.CWBattlePhase.GetValue() == 3 && GetLinkedRef(Cs.CW3) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CW3)) - (GetLinkedRef(Cs.CW3) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - elseif Cs.CWBattlePhase.GetValue() == 4 && GetLinkedRef(Cs.CW4) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CW4)) - (GetLinkedRef(Cs.CW4) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - elseif Cs.CWBattlePhase.GetValue() == 5 && GetLinkedRef(Cs.CW5) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CW5)) - (GetLinkedRef(Cs.CW5) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - elseif GetLinkedRef(Cs.CWAllPhases) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() Calling CallCatapultStrike() on " + GetLinkedRef(Cs.CWAllPhases)) - (GetLinkedRef(Cs.CWAllPhases) as CWCatapultStrikeSpawnerScript).CallCatapultStrike() - - Else -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "startSpawningCatapultStrikes() NOT calling CallCatapultStrike() because CWBattlePhase == x which doesn't match a GetLinkedRef CWx", 1) - EndIf - - GoToState(OffScreenFireModeWaitingToFire) - RegisterForUpdate(Cs.GetTimeToNextLaunch()) - - EndIf - - EndIf - - EndEvent - -EndState - - -function StopOffscreenFiring() - GoToState(OffScreenFireModeOff) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "StopOffscreenFiring() so went to state OffscreenFireModeOff, calling UnRegisterForUpdate()") - UnregisterForUpdate() -EndFunction - -function StartOffscreenFiring(float LaunchTime) - GoToState(OffScreenFireModeWaitingToFire) - RegisterForUpdate(LaunchTime) -; CWScript.Log("CWCatapultOffscreenFireControlScript", self + "StartOffscreenFiring() so went to state OffScreenFireModeWaitingToFire") -EndFunction diff --git a/source/scripts/cwcatapultscript.psc b/source/scripts/cwcatapultscript.psc deleted file mode 100644 index 884fcfce..00000000 --- a/source/scripts/cwcatapultscript.psc +++ /dev/null @@ -1,399 +0,0 @@ -Scriptname CWCatapultScript extends ObjectReference -{Script on the CWCatapult Activator} - -;NOTES: - -;NORMAL OPERATION: -;To start catapults, 1) Enable() them, THEN 2) call TurnOn() -- THE ORDER IS IMPORTANT... ENABLE() FIRST if you don't then you put it in the mode to always fire as if it were "offscreen" and unloaded -;To stop catapults, 1) call the turnOff() function, then 2) Disable() them -- THE ORDER IS IMPORTANT -;When it's appropriate and you want to start using the CWCatapultStrikeSpawners to pin point where each hit should land, disable() the catapult which will cause it to start using the special effects instead of practical projectiles. - -;When the catapult unloads it sets the UseCWCatapultStrikeSpawners bool to true and calls startSpawningCatapultStrikes() which based on the CWBattlePhase will place special fx explosions at linked refs linked with keywords CW1, CW2, CW3, CW4, CW5 based on the phase - -;START DISABLED AND FIRE USING SPECIAL EFFECTS ONLY: -;To make a catapult never appear in the world but still fire with the special fx explosions, make sure it starts disabled, and instead of enable() it, just call turnOn() function on it. It assumes if it's disabled and you call turnOn() it should start firing as if it was unloaded - - -;AIMING THE CATAPULT -;Run the game, and "setpv aim True" on it in the console -;Now when you activate it in the ready position, it will pop up an aim menu -;One of the options is "Log Coordinates" this will print out the x, y, z position and angles to a text file so you can then enter those in the editor -;One special option is the "Face Target" button. By default this is the player, so you can run to where you want it to aim towards and then activate it via console (prid it, then "activate player") and it will face toward you -;you can also set this as a property on the reference if you have another reference you want to aim it at -;DON'T FORGET to push the "Log Coordinates" button on each catapult you aim, or you will have lost your targetting data - - -Weapon Property WeaponToFire Auto -{BASEOBJECT: Set this to CWCatapultWeapon, this is the weapon that the fire() function is called on.} - -Ammo Property AmmoToFire Auto -{BASEOBJECT: Set this to CWCatapultAmmo, this is the ammo parameter that the fire() function is passed.} - -GlobalVariable Property CWBattlePhase Auto -{BASEOBJECT: Pointer to CWBattlePhase global} - -keyword Property CW1 Auto -{BASEOBJET: pointer to keyword CW1 which defines the CWCatapultStrikerSpawner associated with phase 1 that should place catapult strike effects if this catapult is unloaded and CWBattlePhase is the correct phase} - -keyword Property CW2 Auto -{BASEOBJET: pointer to keyword CW2 which defines the CWCatapultStrikerSpawner associated with phase 2 that should place catapult strike effects if this catapult is unloaded and CWBattlePhase is the correct phase} - -keyword Property CW3 Auto -{BASEOBJET: pointer to keyword CW3 which defines the CWCatapultStrikerSpawner associated with phase 3 that should place catapult strike effects if this catapult is unloaded and CWBattlePhase is the correct phase} - -keyword Property CW4 Auto -{BASEOBJET: pointer to keyword CW4 which defines the CWCatapultStrikerSpawner associated with phase 4 that should place catapult strike effects if this catapult is unloaded and CWBattlePhase is the correct phase} - -keyword Property CW5 Auto -{BASEOBJET: pointer to keyword CW5 which defines the CWCatapultStrikerSpawner associated with phase 5 that should place catapult strike effects if this catapult is unloaded and CWBattlePhase is the correct phase} - -keyword Property CWAllPhases Auto -{BASEOBJET: pointer to keyword CWAllPhases which defines the CWCatapultStrikerSpawner associated with all phases that should place catapult strike effects if this catapult is unloaded} - -Message Property CWCatapultMsgAngle Auto -{BASEOBJECT: pointer to the CWCatapultMsgAngle message} - -Message Property CWCatapultMsgPosition Auto -{BASEOBJECT: pointer to the CWCatapultMsgAngle message} - -float property MinStrikeSpawnerTime = 5.0 Auto -{Optional REFERENCE: minimum seconds that should pass between each CWCatapultStrike special effect Explosion from this catapult} - -float property MaxStrikeSpawnerTime = 10.0 Auto -{Optional REFERENCE: maximum seconds that should pass between each CWCatapultStrike special effect Explosion from this catapult} - -Bool Property Aim Auto -{DEBUG: Put the catapult in aiming mode.} - -ObjectReference Property FaceTarget auto -{DEBUG: object ref id aim at, set before activating the Aiming mode menu in game} - - - - - -;Private Properties / Variables -bool property UseCWCatapultStrikeSpawners auto ;when this is true, don't launch normally, but instead call in special effect explosions (this is set to true when the object is unloaded) -{DON'T SET THIS, FOR DEBUGGING AND INTERNAL USE BY SCRIPT ONLY} - -;set bu TurnOn() and TurnOff() -bool Property TurnedOn Auto ;*** WHEN WE ARE DONE SETTING UP THIS SHOULD BE OFF BY DEFAILT AND TURNED ON WITH A FUNCTION -{DON'T SET THIS, FOR DEBUGGING AND INTERNAL USE BY SCRIPT ONLY} - -; -;state names - must be the same as the name of the states -string busy = "busy" ;busy animating -string ready = "ready" ;loaded and ready to fire -string fired = "fired" ;fired Projectile - - - -;animation events - for convenience these are declared as string variables -string aeFire = "fire" ;send this event to cause the catapult arm to fly up and launch the payload -string aeLaunch = "launch" ;[OBSOLETE] sent from activator at the moment the payload leaves the arm - this is when the weapon should call fire() -string aeFired = "fired" ;sent from activator when the launch animation is complete and it's safe to allow activate events to load it again -string aeReload = "reload" ;send this event to cause the catapult arm to lower and spawn a new payload -string aeReloaded = "reloaded" ;sent from activator when the reload animation is finished and it's safe to allow activate events to launch it again - -string aeStartFired = "startFired" ;send to activator to start a catapult in the fired position. Do not call this any other time than OnLoad or it will look bad. -; - -Event OnLoad() - - - ((self as ObjectReference) as CWCatapultOffscreenFireControlScript).StopOffscreenFiring() - UseCWCatapultStrikeSpawners = False - -; CWScript.Log("CWCatapultScript", self + "OnLoad()") - - RegisterForAnimationEvent(self, aeFire) ;arm goes up and payload launces - RegisterForAnimationEvent(self, aeLaunch) ;last few frames as the payload launches - should coincide with the fire() function call - RegisterForAnimationEvent(self, aeFired) ;arm is at rest after finished launching - RegisterForAnimationEvent(self, aeReload) ;arm goes down and payload appears in it - RegisterForAnimationEvent(self, aeReloaded) ;arm is down and payload appeared - RegisterForAnimationEvent(self, aeStartFired) ;arm should start up - -endEvent - -Event OnUnload() - - if UseCWCatapultStrikeSpawners == False && TurnedOn == true ;if we aren't already doing this for some reason, go ahead and Start - startSpawningCatapultStrikes() - EndIf - -; debug.MessageBox(self + "OnUnload()") -; CWScript.Log("CWCatapultScript", self + "OnUnload()") - - UnRegisterForAnimationEvent(self, aeFire) - UnRegisterForAnimationEvent(self, aeLaunch) - UnRegisterForAnimationEvent(self, aeFired) - UnRegisterForAnimationEvent(self, aeReload) - UnRegisterForAnimationEvent(self, aeReloaded) - UnRegisterForAnimationEvent(self, aeStartFired) -endEvent - -state busy - Event OnBeginState() -; CWScript.Log("CWCatapultScript", self + "OnBeginState() busy") - EndEvent - - ;catch activate - Event OnActivate(ObjectReference akActionRef) -; CWScript.Log("CWCatapultScript", self + "OnActivate(" + akActionRef + "): busy, so doing nothing.") - EndEvent - - -EndState - -auto state ready - Event OnBeginState() -; CWScript.Log("CWCatapultScript", self + "OnBeginState() ready") - EndEvent - - ;catch activate - Event OnActivate(ObjectReference akActionRef) - - if aim == true - showAimingMenu() - Else - - if UseCWCatapultStrikeSpawners == False - launch() -; CWScript.Log("CWCatapultScript", self + "OnActivate(" + akActionRef + ") ready, so called launch().") - - Else -; CWScript.Log("CWCatapultScript", self + "OnActivate(" + akActionRef + ") UseCWCatapultStrikeSpawners == True so I am not launching normally but calling in SFX catapult explosions.") - - EndIf - EndIf - - EndEvent - - -EndState - -state fired - Event OnBeginState() -; CWScript.Log("CWCatapultScript", self + "OnBeginState() fired") - EndEvent - - ;catch activate - Event OnActivate(ObjectReference akActionRef) - reload() -; CWScript.Log("CWCatapultScript", self + "OnActivate(" + akActionRef + ") fired, so called reload.") - EndEvent - -EndState - - -Event OnAnimationEvent(ObjectReference akSource, string asEventName) -; CWScript.Log("CWCatapultScript", self + "ProcessAnimationEvent(" + asEventName + ")") - if asEventName == aeReloaded - GoToState(ready) - - elseif asEventName == aeFired - GoToState(fired) - - endif -EndEvent - - -function TurnOn() - ;allowed to fire - TurnedOn = True - -;*** PUT THIS BACK IN WHEN WE HAVE ACTORS LAUNCHING ENABLED CATAPULTS -; if IsDisabled() - startSpawningCatapultStrikes() -; EndIf -EndFunction - - -function TurnOff(bool AndDisable = True) - ;not allowed to fire - TurnedOn = False - - if AndDisable == True - disable() - EndIf - - ((self as ObjectReference) as CWCatapultOffscreenFireControlScript).StopOffscreenFiring() - -EndFunction - -float function GetTimeToNextLaunch() - float timeToNextLaunch = Utility.RandomFloat(MinStrikeSpawnerTime, MaxStrikeSpawnerTime) -; CWScript.Log("CWCatapultScript", self + "GetTimeToNextLaunch() returning " + timeToNextLaunch) - Return timeToNextLaunch -EndFunction - - -function startSpawningCatapultStrikes() - - if TurnedOn == False -; CWScript.Log("GetTimeToNextLaunch", self + "WARNING: my TurnedOn variable is false, I should NOT be calling startSpawningCatapultStrikes on myself.", 2, 1, 1) - - Else - - UseCWCatapultStrikeSpawners = True - ((self as ObjectReference) as CWCatapultOffscreenFireControlScript).StartOffscreenFiring(GetTimeToNextLaunch()) - - EndIf - -EndFunction - -function launch() - GoToState(busy) -; CWScript.Log("CWCatapultScript", self + "launch()") - PlayAnimationAndWait(aeFire, aeLaunch) - - WeaponToFire.fire(self, AmmoToFire) - -EndFunction - -function reload() - GoToState(busy) -; CWScript.Log("CWCatapultScript", self + "reload()") - PlayAnimation(aeReload) - -EndFunction - - - - -;AIMING MENU STUFF - - -function showAimingMenu() - - float translateSpeed = 100 - - Message thisMessage = CWCatapultMsgAngle - - int button = thisMessage.Show() - int left = 0 - int right = 1 - int back = 2 - int forward = 3 - int face = 4 - int nextMenu = 5 - int log = 6 - int done = 7 - - - float offset = 1 - - if button == left - translateTo(X, Y, Z, GetAngleX(), GetAngleY(), GetAngleZ() - offset, translateSpeed) - elseif button == right - translateTo(X, Y, Z, GetAngleX(), GetAngleY(), GetAngleZ() + offset, translateSpeed) - elseif button == back - translateTo(X, Y, Z, GetAngleX(), GetAngleY() - offset, GetAngleZ(), translateSpeed) - elseif button == forward - translateTo(X, Y, Z, GetAngleX(), GetAngleY() + offset, GetAngleZ(), translateSpeed) - elseif button == face - translateTo(X, Y, Z, GetAngleX(), GetAngleY(), GetFacingToTarget(FaceTarget, True), translateSpeed) - elseif button == nextMenu - showPositioningMenu() - elseif button == log - logPositionAndAngle() - EndIf - - if button != done - showAimingMenu() - EndIf - -EndFunction - - -function showPositioningMenu() - - float translateSpeed = 100 - - Message thisMessage = CWCatapultMsgPosition - - int button = thisMessage.Show() - int left = 0 - int right = 1 - int back = 2 - int forward = 3 - int up = 4 - int down = 5 - int nextMenu = 6 - int log = 7 - int done = 8 - - - float offset = 1 - - float xOffset - float yOffset - - - - ;NOTE: the catapult art is setup facing backwards which is why when moving left/back we add the offsets and moving right/forward we subtract the offsets - - if button == left - xOffset = offset * math.cos(GetAngleZ()) - yOffset = offset * -( math.sin(GetAngleZ()) ) - translateTo(X + xOffset, Y + yOffset, Z, GetAngleX(), GetAngleY(), GetAngleZ(), translateSpeed) - - elseif button == right - xOffset = offset * math.cos(GetAngleZ()) - yOffset = offset * -( math.sin(GetAngleZ()) ) - translateTo(X - xOffset, Y - yOffset, Z, GetAngleX(), GetAngleY(), GetAngleZ(), translateSpeed) - - elseif button == back - xOffset = offset * math.sin(GetAngleZ()) - yOffset = offset * math.cos(GetAngleZ()) - translateTo(X + xOffset, Y + yOffset, Z, GetAngleX(), GetAngleY(), GetAngleZ(), translateSpeed) - - elseif button == forward - xOffset = offset * math.sin(GetAngleZ()) - yOffset = offset * math.cos(GetAngleZ()) - translateTo(X - xOffset, Y - yOffset, Z, GetAngleX(), GetAngleY(), GetAngleZ(), translateSpeed) - - elseif button == up - translateTo(X, Y, Z + offset, GetAngleX(), GetAngleY(), GetAngleZ(), translateSpeed) - elseif button == down - translateTo(X, Y, Z - offset, GetAngleX(), GetAngleY(), GetAngleZ(), translateSpeed) - elseif button == nextMenu - showAimingMenu() - elseif button == log - LogPositionAndAngle() - EndIf - - - if button != done - showPositioningMenu() - EndIf - -EndFunction - -function LogPositionAndAngle() -; CWScript.Log("CWCatapultAimingLog", self + "X: " + X + ", Y:" + Y + ", Z:" + Z + ", Angle X:" + GetAngleX() + ", Angle Y:" + GetAngleY() + ", Angle Z:" + GetAngleZ(), 1, 1) - -EndFunction - - -float function GetFacingToTarget(ObjectReference TargetRef, bool invertFacing = False) - - float deltaX = TargetRef.X - X - float deltaY = TargetRef.Y - Y - float newAngle = math.atan(deltaX/deltaY) - - if TargetRef.Y < Y - newAngle += 180 - EndIf - - if invertFacing - if newAngle >= 180 - newAngle -= 180 - Else - newAngle += 180 - EndIf - EndIf - - return newAngle -EndFunction - diff --git a/source/scripts/cwreinforcementcontrollerscript.psc b/source/scripts/cwreinforcementcontrollerscript.psc deleted file mode 100644 index 09721b67..00000000 --- a/source/scripts/cwreinforcementcontrollerscript.psc +++ /dev/null @@ -1,1328 +0,0 @@ -Scriptname CWReinforcementControllerScript extends Quest - -int Property ReinforcementInterval = 5 Auto -{Waves respawn every X seconds, default = 5} - -float Property PoolAttacker auto hidden ;the current reinforcement pool value -float Property PoolDefender auto hidden ;the current reinforcement pool value - -float Property StartingPoolAttacker auto Hidden -float Property StartingPoolDefender auto Hidden - -bool Property InfiniteRespawnAttacker auto Hidden ;don't subtract from pools, always treat checks for cost to respawn as passing -bool Property InfiniteRespawnDefender auto Hidden ;don't subtract from pools, always treat checks for cost to respawn as passing - - -int Property ThresholdCounterPoolAttacker = -999 auto Hidden ;chunk of reinforcements left, when increments, it means it's time to show objective to player -- for example, every 5% change in pool, increment this value and show the pools to the player -int Property ThresholdCounterPoolDefender = -999 auto Hidden ;chunk of reinforcements left, when increments, it means it's time to show objective to player -- for example, every 5% change in pool, increment this value and show the pools to the player - -int Property PostTicketAttackerCountThreshold = 5 Auto -{Default = 5. After attacker has run out of tickets, how many living attackers should be left before setting the stage defined in StageToSetIfAttackerWipedOut} - -int Property PostTicketDefenderCountThreshold = 5 Auto -{Default = 5. After defender has run out of tickets, how many living attackers should be left before setting the stage defined in StageToSetIfDefenderWipedOut} - -int Property StageToSetIfAttackerWipedOut Auto -{What stage to set if attacker is out of tickets and the number of living attackers is <= to PostTicketAttackerCountThreshold} - -int Property StageToSetIfDefenderWipedOut Auto -{What stage to set if attacker is out of tickets and the number of living attackers is <= to PostTicketDefenderCountThreshold} - -int Property StageToSetIfAttacker25PercentRemainging Auto -{What stage to set if attacker has 25% reinforcements remaining} - -int Property StageToSetIfDefender25PercentRemainging Auto -{What stage to set if attacker has 25% reinforcements remaining} - -bool Property ShowAttackerPoolObjective Auto -{Will we be turning on an objective to show how many attackers are remaining (used for defense sieges} - -bool Property ShowDefenderPoolObjective Auto -{Will we be turning on an objective to show how many attackers are remaining (used for defense sieges} - -Quest Property PoolRemainingObjectiveQuest Auto -{Which quest holds the objective for attacker/defender losses} - -int Property PoolRemainingAttackerObjective Auto -{Which objective to set in LossesQuest to show Attacker losses} - -int Property PoolRemainingDefenderObjective Auto -{Which objective to set in LossesQuest to show Defender losses} - - -Int costForReinforcement = 1 - -bool iterating ;are we in the middle of iterating through the "array" respawning guys? -bool iterateAgain ;should we iterate again through the array immediately? (if someone dies while currently iterating, we should iterate again just to make sure we catch him) - -;Spawn Points -ObjectReference Property SpawnAttacker1 auto hidden -ObjectReference Property SpawnAttacker2 auto hidden -ObjectReference Property SpawnAttacker3 auto hidden -ObjectReference Property SpawnAttacker4 auto hidden -ObjectReference Property SpawnAttackerFailSafe auto hidden - -ObjectReference Property SpawnDefender1 auto hidden -ObjectReference Property SpawnDefender2 auto hidden -ObjectReference Property SpawnDefender3 auto hidden -ObjectReference Property SpawnDefender4 auto hidden -ObjectReference Property SpawnDefenderFailSafe auto hidden - -;Attacker Reinforcements "array" -ReferenceAlias A1 -ReferenceAlias A2 -ReferenceAlias A3 -ReferenceAlias A4 -ReferenceAlias A5 -ReferenceAlias A6 -ReferenceAlias A7 -ReferenceAlias A8 -ReferenceAlias A9 -ReferenceAlias A10 -ReferenceAlias A11 -ReferenceAlias A12 -ReferenceAlias A13 -ReferenceAlias A14 -ReferenceAlias A15 -ReferenceAlias A16 -ReferenceAlias A17 -ReferenceAlias A18 -ReferenceAlias A19 -ReferenceAlias A20 - -;Defender Reinforcements "array" -ReferenceAlias D1 -ReferenceAlias D2 -ReferenceAlias D3 -ReferenceAlias D4 -ReferenceAlias D5 -ReferenceAlias D6 -ReferenceAlias D7 -ReferenceAlias D8 -ReferenceAlias D9 -ReferenceAlias D10 -ReferenceAlias D11 -ReferenceAlias D12 -ReferenceAlias D13 -ReferenceAlias D14 -ReferenceAlias D15 -ReferenceAlias D16 -ReferenceAlias D17 -ReferenceAlias D18 -ReferenceAlias D19 -ReferenceAlias D20 - -;#ALIAS HOLDING THE ATTACK POINT LOCATION -Location AttackPoint - - -;## Quests ## -Quest Property CW auto -Quest Property CWCampaign auto - -;## Scripts ## -CWCampaignScript Property CWCampaignS auto Hidden ;set in OnInit() -CWscript Property CWs auto Hidden ;set in OnInit() - - - -Event OnInit() - - CWCampaignS = CWCampaign as CWCampaignScript - CWs = CW as CWscript - -; CWScript.Log("CWReinforcementControllerScript", self + "OnInit()", 0, true, true) - -EndEvent - - -;State StopSpawning -- no longer try to respawn -State StopSpawning - - Function registerDeath(ReferenceAlias DeadAlias) - ;Do nothing - -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath(" + DeadAlias + ") [in state 'StopSpawning'] so will do nothing.") - EndFunction -EndState - - -; STATE RESPAWNING -State Respawning - - Function registerDeath(ReferenceAlias DeadAlias) ;called in OnDeath event of the dying actor/ReferenceAlias - - - if iterating == True -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath(" + DeadAlias + ") [in state 'Respawning'] and currently iterating through 'array' respawning, so set flag that means iterate again immediately so we pick up this guy if we've already passed his positionin the array.") - iterateAgain = True - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath(" + DeadAlias + ") [in state 'Respawning'] and not currently iterating through 'array' respawning, so doing nothing") - EndIf - - - EndFunction - -EndState -; /STATE RESPAWNING - -function StopSpawning() - GoToState("StopSpawning") - -; CWScript.Log("CWReinforcementControllerScript", self + "stopSpawning() called - went to state 'StopSpawning'") -EndFunction - -function registerDeath(ReferenceAlias DeadAlias) ;called in OnDeath event of the dying actor/ReferenceAlias - GoToState("Respawning") - - -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath(" + DeadAlias + ") [in state 'none'] gone to state 'Respawning'") - - bool done = False - -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath(" + DeadAlias + ") [in state 'none'] will now Wait(" + ReinforcementInterval + ") to spawn reinforcements") - - utility.Wait(ReinforcementInterval) - -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath(" + DeadAlias + ") [in state 'none'] is done waiting and will now try to respawn Aliass") - - - - while !done || iterateAgain ;iterateAgain is set in RegisterDeath() function in the "Respawning" state above - iterating = True ;see RegisterDeath() function in the "Respawning" state above - iterateAgain = False - - tryToRespawnAliass() - - done = True - - iterating = False ;see RegisterDeath() function in the "Respawning" state above - endwhile - - if GetState() != "StopSpawning" ;reminder case sensative - GoToState("none") -; CWScript.Log("CWReinforcementControllerScript", self + "registerDeath() [in state 'none'] is done respawning and is gone to state 'none'") - EndIf - - - -EndFunction - -function tryToRespawnAliass() - - shuffleSpawnMarkers() - - ;CALL TryToRespawnAlias for each variable in both arrays - TryToRespawnAlias(A1) - TryToRespawnAlias(A2) - TryToRespawnAlias(A3) - TryToRespawnAlias(A4) - TryToRespawnAlias(A5) - TryToRespawnAlias(A6) - TryToRespawnAlias(A7) - TryToRespawnAlias(A8) - TryToRespawnAlias(A9) - TryToRespawnAlias(A10) - TryToRespawnAlias(A11) - TryToRespawnAlias(A12) - TryToRespawnAlias(A13) - TryToRespawnAlias(A14) - TryToRespawnAlias(A15) - TryToRespawnAlias(A16) - TryToRespawnAlias(A17) - TryToRespawnAlias(A18) - TryToRespawnAlias(A19) - TryToRespawnAlias(A20) - - TryToRespawnAlias(D1) - TryToRespawnAlias(D2) - TryToRespawnAlias(D3) - TryToRespawnAlias(D4) - TryToRespawnAlias(D5) - TryToRespawnAlias(D6) - TryToRespawnAlias(D7) - TryToRespawnAlias(D8) - TryToRespawnAlias(D9) - TryToRespawnAlias(D10) - TryToRespawnAlias(D11) - TryToRespawnAlias(D12) - TryToRespawnAlias(D13) - TryToRespawnAlias(D14) - TryToRespawnAlias(D15) - TryToRespawnAlias(D16) - TryToRespawnAlias(D17) - TryToRespawnAlias(D18) - TryToRespawnAlias(D19) - TryToRespawnAlias(D20) - - -EndFunction - - -Function TryToRespawnAlias(ReferenceAlias AliasToRespawn) - - float pool - bool isAttacker - - if !AliasToRespawn || AliasToRespawn.GetActorReference().IsDead() == False -; CWScript.Log("CWReinforcementControllerScript", self + "TryToRespawnAlias(" + AliasToRespawn + ") variable is empty or is currently alive, so we are returning without trying to repawn.") - - Return - EndIf - - ;Determine which pool to use, store in pool variable -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") calling IsAliasAttacker()" ) - if IsAliasAttacker(AliasToRespawn) - isAttacker = true - EndIf - - - if IsAttacker -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") is an Attacker. PoolAttacker == " + PoolAttacker ) - pool = PoolAttacker - - else ;assuming is Defender -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") is not an Attacker (assuming is Defender). PoolDefender ==" + PoolDefender ) - pool = PoolDefender - - EndIf - - - ;CHECK FOR POOL NOT BEING EMPTY - if pool < costForReinforcement -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ")... Pool(" + pool + ") < costForReinforcement(" + costForReinforcement + ") So we won't respawn, and will check to see if all teammates are dead." ) - - ;CHECK FOR ALL THE VARIABLES BEING DEAD, IF THEY ARE, THEN SET THE STAGE - if isAttacker -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") is an Attacker, checking CountAttackersAlive()" ) - - if GetStageDone(StageToSetIfAttackerWipedOut) == True -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") StageToSetIfAttackerWipedOut[" + StageToSetIfAttackerWipedOut + "] is set, not bothering to check if any are alive." ) - - Else - if CountAttackersAlive() > PostTicketAttackerCountThreshold -; CWScript.Log("CWReinforcementControllerScript", self +"CountAttackersAlive() > PostTicketAttackerCountThreshold[" + PostTicketAttackerCountThreshold + "] so doing nothing." ) - Else -; CWScript.Log("CWReinforcementControllerScript", self +"CountAttackersAlive() <= PostTicketAttackerCountThreshold[" + PostTicketAttackerCountThreshold + "], so we are setting stage that means all the Attackers are wiped out: " + StageToSetIfAttackerWipedOut) - - if ShowAttackerPoolObjective - showAttackerPool() - endif - - setStage(StageToSetIfAttackerWipedOut) - - EndIf - - endif - - - else ;assuming is Defender -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") is a Defender, checking CountDefendersAlive()" ) - - if GetStageDone(StageToSetIfDefenderWipedOut) == True -; CWScript.Log("CWReinforcementControllerScript", self +"TryToRespawnAlias(" + AliasToRespawn + ") StageToSetIfDefenderWipedOut[" + StageToSetIfDefenderWipedOut + "] is set, not bothering to check if any are alive." ) - - Else - if CountDefendersAlive() > PostTicketDefenderCountThreshold -; CWScript.Log("CWReinforcementControllerScript", self +"CountDefendersAlive() > PostTicketDefenderCountThreshold[" + PostTicketDefenderCountThreshold + "] so doing nothing." ) - Else -; CWScript.Log("CWReinforcementControllerScript", self +"CountDefendersAlive() <= PostTicketDefenderCountThreshold[" + PostTicketDefenderCountThreshold + "], so we are setting stage that means all the Defenders are wiped out: " + StageToSetIfDefenderWipedOut) - - if ShowDefenderPoolObjective - showDefenderPool() - endif - - setStage(StageToSetIfDefenderWipedOut) - - EndIf - - EndIf - - EndIf - -; CWScript.Log("CWReinforcementControllerScript", self + "not respawning " + AliasToRespawn + " which is ref:" + AliasToRespawn.GetReference()) - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "respawning" + AliasToRespawn + " which is ref:" + AliasToRespawn.GetReference()) - - ;SPAWN ALIASES HERE - if isAttacker - ;SPAWN ME AND SUBTRACT FROM POOLAttacker - AliasToRespawn.GetActorReference().Reset(GetAttackerSpawnRef(AliasToRespawn)) - -; ;****TEMP TEST A THEORY ABOUT WHY STUFF IS BROKEN: -; utility.wait(2) -; if AliasToRespawn.GetActorReference().IsDead() -; ; CWScript.Log("CWReinforcementControllerScript", self + " TEMP DEBUG WARNING: Just tried to respawn " + AliasToRespawn + AliasToRespawn.GetReference() + "and he's still dead!!!") -; Else -; ; CWScript.Log("CWReinforcementControllerScript", self + " TEMP DEBUG: All is well, just tried to respawn " + AliasToRespawn + AliasToRespawn.GetReference() + "and he's alive.") -; EndIf -; ;**** - - SubtractFromAttackerPool() - - else ;assuming is Defender - ;SPAWN ME AND SUBTRACT FROM POOLDefender - AliasToRespawn.GetActorReference().Reset(GetDefenderSpawnRef(AliasToRespawn)) - -; ;****TEMP TEST A THEORY ABOUT WHY STUFF IS BROKEN: -; utility.wait(2) -; if AliasToRespawn.GetActorReference().IsDead() -; ; CWScript.Log("CWReinforcementControllerScript", self + "TEMP DEBUG WARNING: Just tried to respawn " + AliasToRespawn + "and he's still dead!!!", 2, 1, 1) -; Else -; ; CWScript.Log("CWReinforcementControllerScript", self + "TEMP DEBUG: All is well, just tried to respawn " + AliasToRespawn + "and he's alive.", 1, 1, 1) -; EndIf -; ;**** - - SubtractFromDefenderPool() - - EndIf - - EndIf - -EndFunction - - -bool function IsAliasAttacker(ReferenceAlias AliasToRespawn) - - bool isAttacker - bool isDefender - - if AliasToRespawn.GetActorReference().IsInFaction(CWs.CWImperialFaction) - if CWs.iImperials == CWs.GetAttacker(AttackPoint) - isAttacker = true - Elseif CWs.iImperials == CWs.GetDefender(AttackPoint) - isDefender = true - Else -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: TryToRespawnAlias(" + AliasToRespawn + ") expected to be either the attacker, or the defender.", 2, True, True) - EndIf - - elseif AliasToRespawn.GetActorReference().IsInFaction(CWs.CWSonsFaction) - if CWs.iSons == CWs.GetAttacker(AttackPoint) - isAttacker = true - Elseif CWs.iSons == CWs.GetDefender(AttackPoint) - isDefender = true - Else -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: TryToRespawnAlias(" + AliasToRespawn + ") expected to be either the attacker, or the defender.", 2, True, True) - EndIf - - Else -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: TryToRespawnAlias(" + AliasToRespawn + ") expected to be either the Imperial faction or Sons faction, is neither.", 2, True, True) - - EndIf - - if isAttacker == True - return True - Else - return False - EndIf -EndFunction - - - -int Function CountAttackersAlive() - -; CWScript.Log("CWReinforcementControllerScript", self + "CountAttackersAlive() checking 'array' to see if all the actors are dead.") - - int returnVal - - returnVal += IsAliasAlive(A1) - returnVal += IsAliasAlive(A2) - returnVal += IsAliasAlive(A3) - returnVal += IsAliasAlive(A4) - returnVal += IsAliasAlive(A5) - returnVal += IsAliasAlive(A6) - returnVal += IsAliasAlive(A7) - returnVal += IsAliasAlive(A8) - returnVal += IsAliasAlive(A9) - returnVal += IsAliasAlive(A10) - returnVal += IsAliasAlive(A11) - returnVal += IsAliasAlive(A12) - returnVal += IsAliasAlive(A13) - returnVal += IsAliasAlive(A14) - returnVal += IsAliasAlive(A15) - returnVal += IsAliasAlive(A16) - returnVal += IsAliasAlive(A17) - returnVal += IsAliasAlive(A18) - returnVal += IsAliasAlive(A19) - returnVal += IsAliasAlive(A20) - -; CWScript.Log("CWReinforcementControllerScript", self + "CountAttackersAlive() will return:" + returnVal) - - return returnVal - -EndFunction - - - -int Function CountDefendersAlive() - -; CWScript.Log("CWReinforcementControllerScript", self + "CountDefendersAlive() checking 'array' to see if all the actors are dead.") - - int returnVal - - returnVal += IsAliasAlive(D1) - returnVal += IsAliasAlive(D2) - returnVal += IsAliasAlive(D3) - returnVal += IsAliasAlive(D4) - returnVal += IsAliasAlive(D5) - returnVal += IsAliasAlive(D6) - returnVal += IsAliasAlive(D7) - returnVal += IsAliasAlive(D8) - returnVal += IsAliasAlive(D9) - returnVal += IsAliasAlive(D10) - returnVal += IsAliasAlive(D11) - returnVal += IsAliasAlive(D12) - returnVal += IsAliasAlive(D13) - returnVal += IsAliasAlive(D14) - returnVal += IsAliasAlive(D15) - returnVal += IsAliasAlive(D16) - returnVal += IsAliasAlive(D17) - returnVal += IsAliasAlive(D18) - returnVal += IsAliasAlive(D19) - returnVal += IsAliasAlive(D20) - -; CWScript.Log("CWReinforcementControllerScript", self + "CountDefendersAlive() will return:" + returnVal) - - return returnVal - -EndFunction - -int Function IsAliasAlive(ReferenceAlias AliasVariableToCheck) - - - if AliasVariableToCheck && AliasVariableToCheck.GetActorReference().IsDead() == False -; CWScript.Log("CWReinforcementControllerScript", self + "IsAliasAlive() is returning true (1) for AliasVariableToCheck:" + AliasVariableToCheck) - Return 1 - - ElseIf AliasVariableToCheck && AliasVariableToCheck.GetActorReference().IsDead() == True -; CWScript.Log("CWReinforcementControllerScript", self + "IsAliasAlive() is returning false (0) for AliasVariableToCheck:" + AliasVariableToCheck) - return 0 - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "IsAliasAlive() is returning false (0) for AliasVariableToCheck:" + AliasVariableToCheck + " because it's empty" ) - return 0 - - endif - -EndFunction - -Function RegisterAttackPoint(Location SiegeLocationAttackPoint) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAttackPoint() setting AttackPoint to: " + SiegeLocationAttackPoint) - - AttackPoint = SiegeLocationAttackPoint -EndFunction - - -Function RegisterAlias(ReferenceAlias AliasToAdd) - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAlias(" + AliasToAdd + ") checking faction and attacker or defender status, and then will call the appropriate RegisterAliasAttacker() or RegisterAliasDefender()") - - - - if AliasToAdd.GetActorReference().IsInFaction(CWs.CWImperialFaction) - if CWs.iImperials == CWs.GetAttacker(AttackPoint) - RegisterAliasAttacker(AliasToAdd) - Elseif CWs.iImperials == CWs.GetDefender(AttackPoint) - RegisterAliasDefender(AliasToAdd) - Else -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: FAILING TO ADD ReferenceAlias TO RESPAWN ARRAY! RegisterAlias(" + AliasToAdd + ") expected to be either the attacker, or the defender.", 2, True, True) - EndIf - - elseif AliasToAdd.GetActorReference().IsInFaction(CWs.CWSonsFaction) - if CWs.iSons == CWs.GetAttacker(AttackPoint) - RegisterAliasAttacker(AliasToAdd) - Elseif CWs.iSons == CWs.GetDefender(AttackPoint) - RegisterAliasDefender(AliasToAdd) - Else -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: FAILING TO ADD ReferenceAlias TO RESPAWN ARRAY! RegisterAlias(" + AliasToAdd + ") expected to be either the attacker, or the defender.", 2, True, True) - EndIf - - Else -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: RegisterAlias(" + AliasToAdd + ") expected to be either the Imperial faction or Sons faction, is neither.", 2, True, True) - - EndIf - -EndFunction - -Function RegisterAliasAttacker(ReferenceAlias AliasToAdd) - - - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() is adding ReferenceAlias " + AliasToAdd) - - if !A1 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A1 variable") - A1 = AliasToAdd - elseif !A2 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A2 variable") - A2 = AliasToAdd - elseif !A3 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A3 variable") - A3 = AliasToAdd - elseif !A4 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A4 variable") - A4 = AliasToAdd - elseif !A5 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A5 variable") - A5 = AliasToAdd - elseif !A6 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A6 variable") - A6 = AliasToAdd - elseif !A7 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A7 variable") - A7 = AliasToAdd - elseif !A8 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A8 variable") - A8 = AliasToAdd - elseif !A9 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A9 variable") - A9 = AliasToAdd - elseif !A10 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A10 variable") - A10 = AliasToAdd - elseif !A11 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A11 variable") - A11 = AliasToAdd - elseif !A12 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A12 variable") - A12 = AliasToAdd - elseif !A13 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A13 variable") - A13 = AliasToAdd - elseif !A14 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A14 variable") - A14 = AliasToAdd - elseif !A15 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A15 variable") - A15 = AliasToAdd - elseif !A16 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A16 variable") - A16 = AliasToAdd - elseif !A17 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A17 variable") - A17 = AliasToAdd - elseif !A18 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A18 variable") - A18 = AliasToAdd - elseif !A19 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A19 variable") - A19 = AliasToAdd - elseif !A20 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasAttacker() adding ReferenceAlias to A20 variable") - A20 = AliasToAdd - Else - -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: RegisterAliasAttacker() ran out of 'array' variables; there is no variable to store ReferenceAlias", 2, True, True) - - EndIf -EndFunction - -Function RegisterAliasDefender(ReferenceAlias AliasToAdd) - - - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() is adding ReferenceAlias " + AliasToAdd) - - if !D1 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D1 variable") - D1 = AliasToAdd - elseif !D2 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D2 variable") - D2 = AliasToAdd - elseif !D3 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D3 variable") - D3 = AliasToAdd - elseif !D4 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D4 variable") - D4 = AliasToAdd - elseif !D5 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D5 variable") - D5 = AliasToAdd - elseif !D6 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D6 variable") - D6 = AliasToAdd - elseif !D7 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D7 variable") - D7 = AliasToAdd - elseif !D8 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D8 variable") - D8 = AliasToAdd - elseif !D9 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D9 variable") - D9 = AliasToAdd - elseif !D10 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D10 variable") - D10 = AliasToAdd - elseif !D11 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D11 variable") - D11 = AliasToAdd - elseif !D12 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D12 variable") - D12 = AliasToAdd - elseif !D13 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D13 variable") - D13 = AliasToAdd - elseif !D14 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D14 variable") - D14 = AliasToAdd - elseif !D15 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D15 variable") - D15 = AliasToAdd - elseif !D16 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D16 variable") - D16 = AliasToAdd - elseif !D17 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D17 variable") - D17 = AliasToAdd - elseif !D18 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D18 variable") - D18 = AliasToAdd - elseif !D19 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D19 variable") - D19 = AliasToAdd - elseif !D20 -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterAliasDefender() adding ReferenceAlias to D20 variable") - D20 = AliasToAdd - Else - -; CWScript.Log("CWReinforcementControllerScript", self + " ERROR: RegisterAliasDefender() ran out of 'array' variables; there is no variable to store ReferenceAlias", 2, True, True) - - EndIf - -EndFunction - -ObjectReference Function TryToGetPrioritySpawnLinkedRef(ReferenceAlias AliasToCheckFor) - ;THIS IS VERY SIMILAR TO TryToGetForcedSpawnLinkedRef - -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef()" ) - - ObjectReference AliasRef = AliasToCheckFor.GetReference() - - ObjectReference linkedRefToReturn = None - - - if CWs.CWBattlePhase.Value == 1 && AliasRef.GetLinkedRef(CWs.CW1PrioritySpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW1PrioritySpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef() found CW1PrioritySpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 2 && AliasRef.GetLinkedRef(CWs.CW2PrioritySpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW2PrioritySpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef() found CW2PrioritySpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 3 && AliasRef.GetLinkedRef(CWs.CW3PrioritySpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW3PrioritySpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef() found CW3PrioritySpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 4 && AliasRef.GetLinkedRef(CWs.CW4PrioritySpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW4PrioritySpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef() found CW4PrioritySpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 5 && AliasRef.GetLinkedRef(CWs.CW5PrioritySpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW5PrioritySpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef() found CW5PrioritySpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetPrioritySpawnLinkedRef() didn't find an appropriate Priority Spawn Linked Ref for: " + AliasRef ) - - EndIf - - return linkedRefToReturn - -EndFunction - - -ObjectReference Function TryToGetForcedSpawnLinkedRef(ReferenceAlias AliasToCheckFor) - ;THIS IS VERY SIMILAR TO TryToGetPrioritySpawnLinkedRef - -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef()" ) - - ObjectReference AliasRef = AliasToCheckFor.GetReference() - - ObjectReference linkedRefToReturn = None - - - if CWs.CWBattlePhase.Value == 1 && AliasRef.GetLinkedRef(CWs.CW1ForcedSpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW1ForcedSpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef() found CW1ForcedSpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 2 && AliasRef.GetLinkedRef(CWs.CW2ForcedSpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW2ForcedSpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef() found CW2ForcedSpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 3 && AliasRef.GetLinkedRef(CWs.CW3ForcedSpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW3ForcedSpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef() found CW3ForcedSpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 4 && AliasRef.GetLinkedRef(CWs.CW4ForcedSpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW4ForcedSpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef() found CW4ForcedSpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - elseif CWs.CWBattlePhase.Value == 5 && AliasRef.GetLinkedRef(CWs.CW5ForcedSpawn) - linkedRefToReturn = AliasRef.GetLinkedRef(CWs.CW5ForcedSpawn) -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef() found CW5ForcedSpawn link: " + linkedRefToReturn + " for: " + AliasRef ) - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "TryToGetForcedSpawnLinkedRef() didn't find an appropriate Forced Spawn Linked Ref for: " + AliasRef ) - - EndIf - - return linkedRefToReturn - -EndFunction - - - - - -ObjectReference Function GetAttackerSpawnRef(ReferenceAlias AliasToCheckFor) - ;VERY SIMILAR TO GetDefenderSpawnRef... these are different functions because I need to return attacker or defender spawn refs - - actor playerActor = Game.GetPlayer() as actor - -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() " ) - - ObjectReference PrioritySpawn = TryToGetPrioritySpawnLinkedRef(AliasToCheckFor) - ObjectReference ForcedSpawn = TryToGetForcedSpawnLinkedRef(AliasToCheckFor) - - if ForcedSpawn -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS(ForcedSpawn) == False, returning " + ForcedSpawn) - return ForcedSpawn - - Elseif PrioritySpawn && playerActor.HasLOS(PrioritySpawn) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS(PrioritySpawn) == False, returning " + PrioritySpawn) - return PrioritySpawn - - elseif playerActor.HasLOS(SpawnAttacker1) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS(SpawnAttacker1) == False, returning " + SpawnAttacker1) - return SpawnAttacker1 - - elseif playerActor.HasLOS(SpawnAttacker2) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS(SpawnAttacker2) == False, returning " + SpawnAttacker2) - return SpawnAttacker2 - - elseif playerActor.HasLOS(SpawnAttacker3) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS(SpawnAttacker3) == False, returning " + SpawnAttacker3) - return SpawnAttacker3 - - elseif playerActor.HasLOS(SpawnAttacker4) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS(SpawnAttacker4) == False, returning " + SpawnAttacker4) - return SpawnAttacker4 - - else -; CWScript.Log("CWReinforcementControllerScript", self + "GetAttackerSpawnRef() playerActor.HasLOS to all the Spawn markers, returning the SpawnAttackerFailsafe:" + SpawnAttackerFailSafe) - return SpawnAttackerFailSafe - - EndIf - -EndFunction - -ObjectReference Function GetDefenderSpawnRef(ReferenceAlias AliasToCheckFor) - ;VERY SIMILAR TO GetAttackerSpawnRef... these are different functions because I need to return attacker or defender spawn refs - - actor playerActor = Game.GetPlayer() as Actor - -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() " ) - - ObjectReference PrioritySpawn = TryToGetPrioritySpawnLinkedRef(AliasToCheckFor) - ObjectReference ForcedSpawn = TryToGetForcedSpawnLinkedRef(AliasToCheckFor) - - if ForcedSpawn -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS(ForcedSpawn) == False, returning " + ForcedSpawn) - return ForcedSpawn - - elseif PrioritySpawn && playerActor.HasLOS(PrioritySpawn) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS(PrioritySpawn) == False, returning " + PrioritySpawn) - return PrioritySpawn - - elseif playerActor.HasLOS(SpawnDefender1) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS(SpawnDefender1) == False, returning " + SpawnDefender1) - return SpawnDefender1 - - elseif playerActor.HasLOS(SpawnDefender2) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS(SpawnDefender2) == False, returning " + SpawnDefender2) - return SpawnDefender2 - - elseif playerActor.HasLOS(SpawnDefender3) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS(SpawnDefender3) == False, returning " + SpawnDefender3) - return SpawnDefender3 - - elseif playerActor.HasLOS(SpawnDefender4) == False -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS(SpawnDefender4) == False, returning " + SpawnDefender4) - return SpawnDefender4 - - else -; CWScript.Log("CWReinforcementControllerScript", self + "GetDefenderSpawnRef() playerActor.HasLOS to all the Spawn markers, returning the SpawnDefenderFailsafe:" + SpawnDefenderFailSafe) - return SpawnDefenderFailSafe - - EndIf - -EndFunction - - -Function RegisterSpawnAttackerAliases(ReferenceAlias Marker1Alias, ReferenceAlias Marker2Alias, ReferenceAlias Marker3Alias, ReferenceAlias Marker4Alias, ReferenceAlias FailSafeMarkerAlias) - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnAttackerMarkersAsAliases() adding ReferenceAlias references.") - - SpawnAttacker1 = Marker1Alias.GetReference() - SpawnAttacker2 = Marker2Alias.GetReference() - SpawnAttacker3 = Marker3Alias.GetReference() - SpawnAttacker4 = Marker4Alias.GetReference() - SpawnAttackerFailSafe = FailSafeMarkerAlias.GetReference() - - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnAttackerMarkersAsAliases() SpawnAttacker1 = " + SpawnAttacker1 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnAttackerMarkersAsAliases() SpawnAttacker2 = " + SpawnAttacker2 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnAttackerMarkersAsAliases() SpawnAttacker3 = " + SpawnAttacker3 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnAttackerMarkersAsAliases() SpawnAttacker4 = " + SpawnAttacker4 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnAttackerMarkersAsAliases() SpawnAttackerFailSafe = " + SpawnAttackerFailSafe ) - -EndFunction - -Function RegisterSpawnDefenderAliases(ReferenceAlias Marker1Alias, ReferenceAlias Marker2Alias, ReferenceAlias Marker3Alias, ReferenceAlias Marker4Alias, ReferenceAlias FailSafeMarkerAlias) - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnDefenderMarkersAsAliases() adding ReferenceAlias references.") - - SpawnDefender1 = Marker1Alias.GetReference() - SpawnDefender2 = Marker2Alias.GetReference() - SpawnDefender3 = Marker3Alias.GetReference() - SpawnDefender4 = Marker4Alias.GetReference() - SpawnDefenderFailSafe = FailSafeMarkerAlias.GetReference() - -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnDefenderMarkersAsAliases() SpawnDefender1 = " + SpawnDefender1 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnDefenderMarkersAsAliases() SpawnDefender2 = " + SpawnDefender2 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnDefenderMarkersAsAliases() SpawnDefender3 = " + SpawnDefender3 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnDefenderMarkersAsAliases() SpawnDefender4 = " + SpawnDefender4 ) -; CWScript.Log("CWReinforcementControllerScript", self + "RegisterSpawnDefenderMarkersAsAliases() SpawnDefenderFailSafe = " + SpawnDefenderFailSafe ) -EndFunction - - - -Function setInfinitePools(bool AttackerHasInfinite = true, bool DefenderHasInfinite = true) -{THIS MUST BE CALLED AFTER CALLING SetPoolAttacker/Defender, or in place of calling those} -;both params are true for backwards compatability when this function set a single variable meaning ALL respawns were infinite - -; CWScript.Log("CWReinforcementControllerScript", self + "setInfinitePools( AttackerHasInfinite==" + AttackerHasInfinite + ", DefenderHasInfinite==" + DefenderHasInfinite + ")") - - if AttackerHasInfinite - PoolAttacker = 9999 - StartingPoolAttacker = 9999 - InfiniteRespawnAttacker = AttackerHasInfinite - - EndIf - - - if DefenderHasInfinite - PoolDefender = 9999 - StartingPoolDefender = 9999 - InfiniteRespawnDefender = DefenderHasInfinite - endif - -EndFunction - -Function SetPoolAttacker(int BasePool = 10, float AttackDeltaMult = 1.0, float scaleMult = 1.0, bool InfinitePool = False) -{PoolAttacker = (BasePool + (AttackDelta * AttackDeltaMult) | 0)) * scaleMult } - - float pool - - - if infinitePool == False - - ;int AttackDelta = CWCampaignS.GetCurrentAttackDelta() - ;ATTACK DELTA IS NO LONGER BEING USED - IT WAS THE RELATIVE STRENGTH OF THE ATTACKER BASED ON THE SURROUNDING HOLDS HE OWNS ADJACENT TO THE CONTESTED HOLD. THERE IS NO CURRENT CAMPAIGN WITH CONTESTED HOLD ANYMORE - ;To make life easier for me, I'm just setting attack delta to 0 rather than restructuring all the logic - - int AttackDelta = 0 - - if AttackDelta > 0 - - pool = (BasePool + (AttackDelta * AttackDeltaMult)) * scaleMult -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolAttacker() Pool[" + Pool + "] = (BasePool[" + BasePool + "] + (AttackDelta[" + AttackDelta + "] * AttackDeltaMult[" + AttackDeltaMult + "])) * scaleMult[" + scaleMult + "]" ) - - Else - - pool = BasePool * scaleMult -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolAttacker() Pool[" + Pool + "] = BasePool[" + BasePool + "] * scaleMult[" + scaleMult + "]" ) - - EndIf - - PoolAttacker = pool as int - StartingPoolAttacker = pool as int - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolAttacker() is making Attackers have an Infinite Pool.") - setInfinitePools(AttackerHasInfinite = true, DefenderHasInfinite = False) ;doesn't set it to false, just doesn't set it to true - - EndIf - - CWs.CWPercentPoolRemainingAttacker.setValue(100) - PoolRemainingObjectiveQuest.UpdateCurrentInstanceGlobal(CWs.CWPercentPoolRemainingAttacker) - -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolAttacker() PoolAttacker = " + PoolAttacker ) - -EndFunction - - -Function SetPoolDefender(int BasePool = 10, float AttackDeltaMult = 1.0, float scaleMult = 1.0, bool InfinitePool = False) -{PoolDefender = (BasePool + (|-AttackDelta| * AttackDeltaMult) | 0)) * scaleMult } - - float pool - - - if infinitePool == False - - ;int AttackDelta = CWCampaignS.GetCurrentAttackDelta() - ;ATTACK DELTA IS NO LONGER BEING USED - IT WAS THE RELATIVE STRENGTH OF THE ATTACKER BASE ON THE SURROUNDING HOLDS HE OWNS ADJACENT TO THE CONTESTED HOLD. THERE IS NO CURRENT CAMPAIGN WITH CONTESTED HOLD ANYMORE - ;To make life easier for me, I'm just setting attack delta to 0 rather than restructuring all the logic - - int AttackDelta = 0 - - if AttackDelta < 0 - - pool = (BasePool + (Math.ABS(AttackDelta) * AttackDeltaMult)) * scaleMult -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolDefender() Pool[" + Pool + "] = (BasePool[" + BasePool + "] + (Math.ABS(AttackDelta[" + AttackDelta + "]) * AttackDeltaMult[" + AttackDeltaMult + "])) * scaleMult[" + scaleMult + "]" ) - - - Else - - pool = BasePool * scaleMult -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolDefender() Pool[" + Pool + "] = BasePool[" + BasePool + "] * scaleMult[" + scaleMult + "]" ) - - EndIf - - PoolDefender = pool as int - StartingPoolDefender = pool as int - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolDefender() is making Defenders have an Infinite Pool.") - setInfinitePools(AttackerHasInfinite = False, DefenderHasInfinite = True) ;doesn't set it to false, just doesn't set it to true - - EndIf - - CWs.CWPercentPoolRemainingDefender.setValue(100) - PoolRemainingObjectiveQuest.UpdateCurrentInstanceGlobal(CWs.CWPercentPoolRemainingDefender) - - -; CWScript.Log("CWReinforcementControllerScript", self + "SetPoolDefender() PoolDefender = " + PoolDefender ) - -EndFunction - -function shuffleSpawnMarkers() -{Promotes each spawn alias into the next position so that the first choice of respawn point is "randomized"} - - -; CWScript.Log("CWReinforcementControllerScript", self + "shuffleSpawnAliases() shuffling Spawn Marker Aliases.") - - ObjectReference tempSpawn4 - tempSpawn4 = SpawnAttacker4 - SpawnAttacker4 = SpawnAttacker3 - SpawnAttacker3 = SpawnAttacker2 - SpawnAttacker2 = SpawnAttacker1 - SpawnAttacker1 = TempSpawn4 - - tempSpawn4 = SpawnDefender4 - SpawnDefender4 = SpawnDefender3 - SpawnDefender3 = SpawnDefender2 - SpawnDefender2 = SpawnDefender1 - SpawnDefender1 = TempSpawn4 - -EndFunction - - -function SubtractFromAttackerPool(int NumSoldiersToSubtractBy = 1) -{This function subtracts the value of a soldier from the bool} ;Note: this is occasionally called externally when we need to modify the pool for some other reason than respawning a soldier - - if InfiniteRespawnAttacker == False -; CWScript.Log("CWReinforcementControllerScript", self + "SubtractFromAttackerPool() calling ModifyPool().") - ModifyPool(true, -(NumSoldiersToSubtractBy)) - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "SubtractFromAttackerPool() InfiniteRespawnAttacker == true, so NOT modifying the pool") - - EndIf - - -EndFunction - -function SubtractFromDefenderPool(int NumSoldiersToSubtractBy = 1) -{This function subtracts the value of a soldier from the bool} ;Note: this is occasionally called externally when we need to modify the pool for some other reason than respawning a soldier - - if InfiniteRespawnDefender == False -; CWScript.Log("CWReinforcementControllerScript", self + "SubtractFromDefenderPool() calling ModifyPool().") - ModifyPool(false, -(NumSoldiersToSubtractBy)) - - Else -; CWScript.Log("CWReinforcementControllerScript", self + "SubtractFromDefenderPool() InfiniteRespawnDefender == true, so NOT modifying the pool") - - EndIf - -EndFunction - -function AddBackToAttackerPool(int NumSoldiersToAddBackBy = 1) -{This function subtracts the value of a soldier from the bool} ;Note: this is occasionally called externally to add back to the pool - -; CWScript.Log("CWReinforcementControllerScript", self + "AddBackToAttackerPool() calling ModifyPool().") - ModifyPool(true, NumSoldiersToAddBackBy) - -EndFunction - -function AddBackToDefenderPool(int NumSoldiersToAddBackBy = 1) -{This function subtracts the value of a soldier from the bool} ;Note: this is occasionally called externally to add back to the pool - -; CWScript.Log("CWReinforcementControllerScript", self + "AddBackToDefenderPool() calling ModifyPool().") - ModifyPool(False, NumSoldiersToAddBackBy) - -EndFunction - -function ModifyPool(bool ModAttackerPool, int NumSoldiersToModifyBy) -{ModAttacker should be true if we are modifying attacker pool, false if modifying defender pool. NumSoldiersToModifyBy should be positve if adding to pool, or negative if subtracting from pool} - int valueToModifyBy = CostForReinforcement * NumSoldiersToModifyBy - - float percentRemaningAttacker = PoolAttacker / StartingPoolAttacker - float percentRemaningDefender = PoolDefender / StartingPoolDefender - - - if ModAttackerPool -; CWScript.Log("CWReinforcementControllerScript", self + "ModifyPool() modifying attacker pool by: " + valueToModifyBy) - PoolAttacker += valueToModifyBy - CWs.CWReinforcementPoolAttacker.SetValue(PoolAttacker) - if getStageDone(StageToSetIfAttacker25PercentRemainging) == false && percentRemaningAttacker <= 0.25 - setStage(StageToSetIfAttacker25PercentRemainging) - EndIf - - Else ;we are modifying defender pool -; CWScript.Log("CWReinforcementControllerScript", self + "ModifyPool() modifying defender pool by: " + valueToModifyBy) - PoolDefender += valueToModifyBy - CWs.CWReinforcementPoolDefender.SetValue(PoolDefender) - if getStageDone(StageToSetIfDefender25PercentRemainging) == false && percentRemaningDefender <= 0.25 - setStage(StageToSetIfDefender25PercentRemainging) - EndIf - EndIf - - ShowPoolsToPlayer() - -EndFunction - - - - -function killOffscreenDefender() -;This function kills an offscreen soldier in the defender alias "array". -;This is called by CWFortSiege Interior Defender Aliases on Death to give a reward to attacker for killing an interior defender, because interior defenders don't respawn normally -;See CWFortSiegeInteriorDefenderScript -; CWScript.Log("CWReinforcementControllerScript", self + "killOffscreenDefender()") - - bool success - - if tryToKillOffscreenDefender(D1) - success = true - elseif tryToKillOffscreenDefender(D2) - success = true - elseif tryToKillOffscreenDefender(D3) - success = true - elseif tryToKillOffscreenDefender(D4) - success = true - elseif tryToKillOffscreenDefender(D5) - success = true - elseif tryToKillOffscreenDefender(D6) - success = true - elseif tryToKillOffscreenDefender(D7) - success = true - elseif tryToKillOffscreenDefender(D8) - success = true - elseif tryToKillOffscreenDefender(D9) - success = true - elseif tryToKillOffscreenDefender(D10) - success = true - elseif tryToKillOffscreenDefender(D11) - success = true - elseif tryToKillOffscreenDefender(D12) - success = true - elseif tryToKillOffscreenDefender(D13) - success = true - elseif tryToKillOffscreenDefender(D14) - success = true - elseif tryToKillOffscreenDefender(D15) - success = true - elseif tryToKillOffscreenDefender(D16) - success = true - elseif tryToKillOffscreenDefender(D17) - success = true - elseif tryToKillOffscreenDefender(D18) - success = true - elseif tryToKillOffscreenDefender(D19) - success = true - elseif tryToKillOffscreenDefender(D20) - success = true - EndIf - - if success -; CWScript.Log("CWReinforcementControllerScript", self + "killOffscreenDefender() found an offscreen defender and killed him.") - Else -; CWScript.Log("CWReinforcementControllerScript", self + "killOffscreenDefender() could not find an offscreen defender so didn't kill anyone.", 1) - EndIf - -EndFunction - -bool function tryToKillOffscreenDefender(ReferenceAlias AliasToTryToKill) - Actor AliasActor = AliasToTryToKill.GetActorReference() - - if AliasActor - if AliasActor.IsDead() == false && AliasActor.IsInInterior() == False - if Game.GetPlayer().IsInInterior() == True - if AliasActor.GetParentCell() != Game.GetPlayer().GetParentCell() -; CWScript.Log("CWReinforcementControllerScript", self + "tryToKillOffscreenDefender() killing " + AliasActor + " in alias " + AliasToTryToKill) - AliasActor.kill() - Return True - EndIf - EndIf - EndIf - EndIf - -; CWScript.Log("CWReinforcementControllerScript", self + "tryToKillOffscreenDefender() NOT killing " + AliasActor + " in alias " + AliasToTryToKill + "because he's not not dead, not in an exterior, the player isn't in an interior, or they are in the same interior.") - return False - -EndFunction - - -int function getPoolExpressedAsSoldierCount(float Pool) -{returns Pool/Cost per soldier} - - int soldiers = math.floor(Pool / CostForReinforcement) as Int - - if soldiers < 0 - soldiers = 0 - EndIf - -; CWScript.Log("CWReinforcementControllerScript", self + "getPoolExpressedAsSoldierCount() returning: " + soldiers) - - return soldiers - -EndFunction - -function ShowPoolsToPlayer() -; CWScript.Log("CWReinforcementControllerScript", self + "ShowPoolsToPlayer() PoolAttacker=" + PoolAttacker +", PoolDefender=" + PoolDefender) - TryToShowAttackerPools() - TryToShowDefenderPools() - -EndFunction - -int function GetThresholdCounter(float startingPool, float CurrentPool, float PercentThreshold = 5.0) -{Returns an int that when it "ticks" means it's time to show the pool to the player (for example every 5% of reinforcements)} - -; CWScript.Log("CWReinforcementControllerScript", self + "GetThresholdCounter() startingPool: " + startingPool + ", CurrentPool: " + CurrentPool + ", PercentThreshold:" + PercentThreshold) - - ;convert pools to soldier counts incase we later change the cost per soldier - startingPool = getPoolExpressedAsSoldierCount(startingPool) - CurrentPool = getPoolExpressedAsSoldierCount(currentPool) - - ;chunk the percentage into an integer we can compare to the last time - float thresholdCounter = currentPool / startingPool * 100 / PercentThreshold - -; CWScript.Log("CWReinforcementControllerScript", self + "GetThresholdCounter() returning: " + thresholdCounter as int) - - return thresholdCounter as int - -EndFunction - -function TryToShowAttackerPools() - - int currentThresholdCounter - - if ShowAttackerPoolObjective -; CWScript.Log("CWReinforcementControllerScript", self + "TryToShowAttackerPools() will check to see if enough tickets were lost to display the number again.") - - currentThresholdCounter = GetThresholdCounter(StartingPoolAttacker, PoolAttacker, 5) - - if ThresholdCounterPoolAttacker == -999 ;initialized value - ThresholdCounterPoolAttacker = currentThresholdCounter - ShowAttackerPool() - EndIf - - if currentThresholdCounter < ThresholdCounterPoolAttacker - ;then we've reached the next 5% threshold - ThresholdCounterPoolAttacker -= 1 - ShowAttackerPool() - Else - ;then we didn't reach the next 5% threshold so don't show the pool to the player -; CWScript.Log("CWReinforcementControllerScript", self + "TryToShowAttackerPools() found it's not yet time to display the number again. CurrentThresholdCounter: " + currentThresholdCounter + " is not > than ThresholdCounterPoolAttacker:" + ThresholdCounterPoolAttacker) - - EndIf - - Else - ;we aren't supposed to show -; CWScript.Log("CWReinforcementControllerScript", self + "TryToShowAttackerPools() isn't supposed to show Attacker Pool.") - EndIf - -EndFunction - -function TryToShowDefenderPools() - - int currentThresholdCounter - - if ShowDefenderPoolObjective -; CWScript.Log("CWReinforcementControllerScript", self + "TryToShowDefenderPools() will check to see if enough tickets were lost to display the number again.") - - currentThresholdCounter = GetThresholdCounter(StartingPoolDefender, PoolDefender, 7) - - if ThresholdCounterPoolDefender == -999 ;initialized value - ThresholdCounterPoolDefender = currentThresholdCounter - ShowDefenderPool() - EndIf - - if currentThresholdCounter < ThresholdCounterPoolDefender - ;then we've reached the next 5% threshold - ThresholdCounterPoolDefender -= 1 - ShowDefenderPool() - Else - ;then we didn't reach the next 5% threshold so don't show the pool to the player -; CWScript.Log("CWReinforcementControllerScript", self + "TryToShowDefenderPools() found it's not yet time to display the number again. CurrentThresholdCounter: " + currentThresholdCounter + " is not > than ThresholdCounterPoolDefender:" + ThresholdCounterPoolDefender) - - EndIf - - Else - ;we aren't supposed to show -; CWScript.Log("CWReinforcementControllerScript", self + "TryToShowDefenderPools() isn't supposed to show Defender Pool.") - EndIf - -EndFunction - -function showAttackerPool() - - float percentRemaning = PoolAttacker / StartingPoolAttacker - -; CWScript.Log("CWReinforcementControllerScript", self + "showAttackerPool() Attackers % Remaining =" + percentRemaning) - - CWs.CWPercentPoolRemainingAttacker.setValue((percentRemaning * 100) as Int) - PoolRemainingObjectiveQuest.UpdateCurrentInstanceGlobal(CWs.CWPercentPoolRemainingAttacker) - - - if CWs.CWPercentPoolRemainingAttacker.GetValue() > 0 - PoolRemainingObjectiveQuest.SetObjectiveDisplayed(PoolRemainingAttackerObjective, true, true) - Else - PoolRemainingObjectiveQuest.SetObjectiveDisplayed(PoolRemainingAttackerObjective) - PoolRemainingObjectiveQuest.SetObjectiveCompleted(PoolRemainingAttackerObjective) - endif - - -EndFunction - -function showDefenderPool() - - float percentRemaning = PoolDefender / StartingPoolDefender - -; CWScript.Log("CWReinforcementControllerScript", self + "showDefenderPool() Defenders % Remaining =" + percentRemaning) - - CWs.CWPercentPoolRemainingDefender.setValue((percentRemaning * 100) as Int) - PoolRemainingObjectiveQuest.UpdateCurrentInstanceGlobal(CWs.CWPercentPoolRemainingDefender) - - - if CWs.CWPercentPoolRemainingDefender.GetValue() > 0 - PoolRemainingObjectiveQuest.SetObjectiveDisplayed(PoolRemainingDefenderObjective, true, true) - Else - PoolRemainingObjectiveQuest.SetObjectiveDisplayed(PoolRemainingDefenderObjective) - PoolRemainingObjectiveQuest.SetObjectiveCompleted(PoolRemainingDefenderObjective) - endif - -EndFunction diff --git a/source/scripts/cwscript.psc b/source/scripts/cwscript.psc index 9dc32c7a..e71df462 100644 --- a/source/scripts/cwscript.psc +++ b/source/scripts/cwscript.psc @@ -1,5288 +1 @@ Scriptname CWScript extends Quest Conditional -{Main script for the Civil War, holds many "global" properties for the system.} - -;NOTE: -;The Civil War has gone through many iterations. There's a lot of obsolete stuff in here from previous iterations where it was more dynamic and free form. -;So if you're a modder looking for scripting examples, while there's some interesting things going on in here, the CW scripts are probably not the best place to start. There's a lot of obsolete and deprecated complexity in these systems - -;#POINTER TO GLOBAL SHOW DEBUG TRACES -GlobalVariable property debugOn auto conditional ;###This is largely obsolete property, but there are a few things that still refer to it. See the Log() function below for the new way to do this ;0 = unset, 1 = set - show warnings -{Pointer to Global CWDebugOn, used to toggle on trace spam} - -;Variables -;int property debugForceAttacker auto conditional hidden ;0 = unset, 1 = force the attacker to always be Imperials, 2 = Sons of Skyrim; see stage 10 -;int property debugForceHold auto conditional hidden ;0 = unset, 1 = force the Contested Hold to be this enum value (see contestedHold variable below for enums) - -GlobalVariable Property CWDebugForceAttacker Auto -GlobalVariable Property CWDebugForceHold Auto -GlobalVariable Property CWDebugAllowCampaignsInFinalHolds Auto - -int property debugForceOffscreenResult auto conditional hidden ;The next time the campaign updates it's script, it will force an Offscreen resolution, Note: this also forces the Quest Delay time to be a frame long to speed everything up -int property debugDBTraces auto conditional hidden ;0 = unset, 1 = export warnings that are database friendly - -int Property debugTreatCityCapitalsAsTowns auto Conditional Hidden ;0 = unset, 1 = causes Cities such as Whiterun, to be considered towns and start minor hold resolution quests -int Property debugStartingCampaignPhase auto Conditional Hidden ;0 = unset, N = the phase that the campaign starts in, for example, you could force the campaign to always start in the resolution phase if you need to test a resolution quest - -int Property debugAllowNonAdjacentHolds Auto Conditional Hidden ;0 = unset, 1 = allow attacks against holds where attacker has no adjacent holds - -int property debugSkipSetOwnerCalls auto Hidden ;0 unset, 1 = ignore calls to setOwner... breaks things but causes Civil War campaign to start much faster for certain types of play testing - -;tracking variables -int property countCampaigns auto conditional Hidden ;how many campaigns have run -int property countWinImperials auto conditional Hidden ;how many times have the Imperials won a campaign -int property countWinSons auto conditional Hidden ;how many times have the Sons won a campaign - -;how many times has the faction won this hold -int property countWinReachImperials auto conditional Hidden -int property countWinReachSons auto conditional Hidden -int property countWinHjaalmarchImperials auto conditional Hidden -int property countWinHjaalmarchSons auto conditional Hidden -int property countWinWhiterunImperials auto conditional Hidden -int property countWinWhiterunSons auto conditional Hidden -int property countWinFalkreathImperials auto conditional Hidden -int property countWinFalkreathSons auto conditional Hidden -int property countWinPaleImperials auto conditional Hidden -int property countWinPaleSons auto conditional Hidden -int property countWinWinterholdImperials auto conditional Hidden -int property countWinWinterholdSons auto conditional Hidden -int property countWinRiftImperials auto conditional Hidden -int property countWinRiftSons auto conditional Hidden - -int Property campaignRunning auto Conditional Hidden ;(set in CWCampaign stage 0) 0 = not running, 1 = busy setting up campaign, 2 = done setting up and other quests and scripts can assume its safe to poke the campaign - - -;Offscreen resolution stuff -float property resolutionAttackDeltaMultiplier auto conditional Hidden ;(set in the "init" block below) the value that gets multipled to the attack Delta in the offscreen resolution formula before being added to the die roll -float property resolutionDieRoll auto conditional Hidden ;1-100, gets adding to the AttackDelta*Multiplier in the offscreen resolution formula -Bool Property resolutionForced auto conditional Hidden ;True = Defender is forced to be the winner because the player wasn't yet involved in the campaign for the hold which was a major hold with a city (we don't want cities changing hands if the player never got involved) -float property resolutionResult auto conditional Hidden ;> 50 = Attacker wins, <= 50 means Defender wins - -int property playerAllegiance auto conditional Hidden ;0 = unset, 1 = player joined Imperials, 2 = Sons of Skyrim -- note before the player commits in the main quest, the system still needs him to be on a "side" because it assumes he always is on a side, in CW Stage 0 it puts him in Imperials if he isn't already commited -;REM'd out bit below is used to debug if a script is setting this incorrectly somwhere -;int playerAllegianceVar -;int Property playerAllegiance Hidden -; function set(int value) -; ; debug.tracestack("*playerAllegiance = "+value) -; playerAllegianceVar = value -; EndFunction -; int function get() -; return playerAllegianceVar -; EndFunction -;EndProperty - - -int property playerJoinedCampaginReach auto conditional Hidden ;0 = unset, 1 = player took a mission in that hold. Until this = 1 any offscreen resolution will always fail for the attacker. This ensures that the player has a chance to see "pre-switched" state and see the new Jarl's plot arc. -int property playerJoinedCampaginWhiterun auto conditional Hidden -int property playerJoinedCampaginRift auto conditional Hidden -int Property PlayerJoinedCurrentCampaign auto Hidden ;used for determining salary, set in CWMissionScript PlayerAcceptsMission() - -int Property TutorialMissionComplete Auto Conditional Hidden ;0 = unset, 1 = player completed the tutorial mission -- this changes the behavior of the resolution phase. (See CWCampaignScript StartMissions()) Until the player completes the tutorial, resolution phase will finish offscreen immediately. - -int Property PlayerGotIntro Auto Conditional hidden ;player got the "do i know you? I was at helgen? Oh, you were at helgen" stuff from one of the factions, used to make the other faction recognize you right away so you don't have go through all that again - -int property playerInvolved auto conditional Hidden ;0 = unset, 1 = the player is now involved in the Civil War -int Property WarIsActive Auto Conditional Hidden ;0 = not set, 1 = active and player can get missions from field cos, -1 = paused and should not start new missions - -bool Property EnemyFortsAddedBackToWar auto conditional Hidden ;see AddEnemyFortsBackToWar() - -int property playerReport auto conditional Hidden ;See FinishCampaign() - 0 = un/reset, 1 = player should report, 2 = player reported to faction head after campaign - -bool Property WhiterunSiegeStarted Auto Hidden ;used by CWFieldCOScript if the whiterun siege has started, don't try starting it again -bool Property WhiterunSiegeFinished Auto conditional Hidden ;means the initial siege of whiterun has either been won, or lost - -int property contestedHoldWinner auto conditional Hidden ;1 = Imperials, 2 = Sons -int Property contestedHoldWinType auto Conditional Hidden ;0 = unset, 1 = Attacker won, 2 Defender won - -float property attackerCoinToss auto conditional Hidden ;0 = unset, 1 = imperials, 2=Sons of Skyrim (see CW Stage 10) -int property previousAttacker auto conditional Hidden ;0 = unset, 1 = Imperials, 2=Sons of Skyrim -int property consecutiveAttacks auto conditional Hidden ;0 = unset/reset, # = number of times the same side attacked (used to force change if randomly picks the same one too many times in arow) - -;ints representing each side, corresponds to other variables that store 1 or 2 to mean Imperials or Sons... for testing things like: "if attacker == iImperials" -int Property iImperials = 1 Auto Hidden -int Property iSons = 2 Auto Hidden -int Property iBothFactions = 3 Auto Hidden - -int Property iCurrentOwner = -999 Auto Hidden ;used by SetOwner and it's related functions (means just reset the garrison, don't change the owner) - -int property attacker auto conditional Hidden ;0 = unset, 1 = Imperials, 2=Sons of Skyrim -int property defender auto conditional Hidden ;0 = unset, 1 = Imperials, 2=Sons of Skyrim -int property choosingHold auto conditional Hidden ;0 = unset, ;N = iteration of trying to chose a hold to attack, -N means successful after N tries (see game mode block) - -;properties representing holds as ints -int Property iHaafingar = 1 auto Hidden ;* can't be contested -int Property iReach = 2 auto Hidden -int Property iHjaalmarch = 3 auto Hidden -int Property iWhiterun = 4 auto Hidden -int Property iFalkreath = 5 auto Hidden -int Property iPale = 6 auto Hidden -int Property iWinterhold = 7 auto Hidden -int Property iEastmarch = 8 auto Hidden ;* can't ne contested -int Property iRift = 9 auto Hidden -;list for ease of copying and pasting: -;iHaafingar iReach iHjaalmarch iWhiterun iFalkreath iPale iWinterhold iEastmarch iRift - -;list of hold names -;Haafingar Reach Hjaalmarch Whiterun Falkreath Pale Winterhold Eastmarch Rift - -int property contestedHold auto conditional Hidden -int property previousContestedHold auto conditional Hidden -;enums meaning which hold is contested - these are same values as assigned to iHaafinager, iReach, etc. so you can test 'contestedHold == iReach', etc. -;0 = unset -;1 = Haafingar* -;2 = Reach -;3 = Hjaalmarch -;4 = Whiterun -;5 = Falkreath -;6 = Pale -;7 = Winterhold -;8 = Eastmarch* -;9 = Rift -;* can't be contested - -;Current Owner of Holds ;0 = unset, 1 = Imperial controlled, 2 = Sons of Skyrim controlled -int property OwnerHaafingar auto conditional Hidden -int property OwnerReach auto conditional Hidden -int property OwnerHjaalmarch auto conditional Hidden -int property OwnerWhiterun auto conditional Hidden -int property OwnerFalkreath auto conditional Hidden -int property OwnerPale auto conditional Hidden -int property OwnerWinterhold auto conditional Hidden -int property OwnerEastmarch auto conditional Hidden -int property OwnerRift auto conditional Hidden - -int property ownerContestedHold auto conditional Hidden ;0 = unset, 1 = Imperial controlled, 2 = Sons of Skyrim controlled - -int property countHoldsImperial auto Conditional Hidden ;how many holds do the Imperials currently control -int property countHoldsSons auto Conditional Hidden ;how many holds to the Sons currently control - - -;Adjacency info (if any of this changes, make sure the function that compute Strength Values is changed accordingly) -;Haafingar Reach, Hjaalmarch -;Reach Haafingar, Hjaalmarch, Whiterun, Falkreath -;Hjaalmarch Haafingar, Reach, Whiterun, Pale -;Whiterun Reach, Hjaalmarch, Falkreath, Pale, Eastmarch, Rift -;Falkreath Reach, Whiterun, Rift -;Pale Hjaalmarch, Whiterun, Winterhold, Eastmarch -;Winterhold Pale, Eastmarch -;Eastmarch Winterhold, Pale, Whiterun, Rift -;Rift Whiterun, Falkreath, Eastmarch - - - -;Strength Value of Holds ;0 = unset, N = number of Strength Value points this hold is worth when adjacent to contested hold -int property StrValueHaafingar auto Hidden -int property StrValueReach auto Hidden -int property StrValueHjaalmarch auto Hidden -int property StrValueWhiterun auto Hidden -int property StrValueFalkreath auto Hidden -int property StrValuePale auto Hidden -int property StrValueWinterhold auto Hidden -int property StrValueEastmarch auto Hidden -int property StrValueRift auto Hidden - - -;Strength Points per hold for each faction (used by setStrengthPoints()) 0 = doesn't own adjacent holds, N= total of Strength Value points contributed by adjacent holds controlled by faction -int property strHaafingarImperial auto conditional Hidden -int property strHaafingarSons auto conditional Hidden -int property strReachImperial auto conditional Hidden -int property strReachSons auto conditional Hidden -int property strHjaalmarchImperial auto conditional Hidden -int property strHjaalmarchSons auto conditional Hidden -int property strWhiterunImperial auto conditional Hidden -int property strWhiterunSons auto conditional Hidden -int property strFalkreathImperial auto conditional Hidden -int property strFalkreathSons auto conditional Hidden -int property strPaleImperial auto conditional Hidden -int property strPaleSons auto conditional Hidden -int property strWinterholdImperial auto conditional Hidden -int property strWinterholdSons auto conditional Hidden -int property strEastmarchImperial auto conditional Hidden -int property strEastmarchSons auto conditional Hidden -int property strRiftImperial auto conditional Hidden -int property strRiftSons auto conditional Hidden - -int property strContestedHoldImperial auto conditional Hidden ;same as above, but localized for currently Contested Hold -int property strContestedHoldSons auto conditional Hidden - -int property strAttacker auto conditional Hidden ;same as above, but localized for the current Attacker -int property strDefender auto conditional Hidden ;same as above, but localized for the current Defender - -int property MaxAttackDelta auto conditional Hidden ;the max attack delta can be -int property AttackDelta auto conditional Hidden ;Current Relative Attacker Strength - initally equal to (strAttacker - strDefender), it is modified by completing objectives in free form game play and missions -int property PurchaseDelta auto conditional Hidden ;The AttackDelta in a form that can be subtracted from to "pay for" locations in the contested hold (see each Campaign Quest Stage 20) - - -;Costs associated with Garrison types (see SetGarrisonCost() and SetInitialGarrisonCosts()) -int Property iCostNonContestable Auto Hidden -int Property iCostFort Auto Hidden -int Property iCostSmall Auto Hidden -int Property iCostMedium Auto Hidden -int Property iCostLarge Auto Hidden -int Property iCostPatrol Auto Hidden - -;Holds the location that was last "attacked" in the civil war... attack, sabotaged, etc. Used primarily by MQ302 scene dialogue, but could be useful elsewhere (general rumors, etc.) -;Set by CWMissionScript->RegisterLocationWasRaidedByAttacker() -Location Property LastLocAttackedByImperials Auto Hidden -Location Property LastLocAttackedBySons Auto Hidden -Location Property LastLocAttacked Auto Hidden - - -bool Property WinHoldAndSetOwnerAlreadySetKeyword Auto Hidden ;used in conjunction with WinHoldAndSetOwnerKeywordDataOnly and WinHoldAndSetOwner -bool Property WinningHoldAndSettingOwnerPleaseWait Auto Hidden ;used in conjunction with WinHoldAndSetOwnerKeywordDataOnly and WinHoldAndSetOwner - -Bool Property WaitingForCWResetGarrisonQuest1 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison1 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest2 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison2 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest3 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison3 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest4 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison4 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest5 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison5 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest6 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison6 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest7 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison7 shutdown stage -Bool Property WaitingForCWResetGarrisonQuest8 auto Hidden ;SEE SetOwner() function below - set in SetOwner() cleared in CWResetGarrison8 shutdown stage - - -int property init auto Hidden ;the 1 = OnInit() event was called -;int initvar -;int property init Hidden ;the 1 = OnInit() event was called -;function set(int value) -; ; debug.tracestack("*init = "+value) -; initvar = value -;EndFunction -;int function get() -; return initvar -;EndFunction -;endproperty - - - -;Player Rank - -int Property PlayerRank Auto Conditional Hidden ;the rank the player is in the Faction -int property CountMissionSuccess Auto Conditional Hidden ;the number of successful missions -Float Property baseSalary Auto hidden ;amount in gold the player's base campaign salary is -Float Property SalaryMultRank1 Auto hidden ;multiplier to baseSalary based on player rank -Float Property SalaryMultRank2 Auto hidden ;multiplier to baseSalary based on player rank -Float Property SalaryMultRank3 Auto hidden ;multiplier to baseSalary based on player rank -Float Property SalaryMultRank4 Auto hidden ;multiplier to baseSalary based on player rank -int Property Salary Auto conditional Hidden ;holds the total of uncollected player salary see ContributeSalaryPool() and PaySalary(), used as condition on dialogue - - -Bool Property BuddyDialogueAllowed auto conditional hidden ;set in stage 30 of CW02A/B and conditioned in buddy dialogue so you don't get the dialogue before Korvanjund - - -int Property CWMission03Done auto Conditional Hidden ;used by story manager, set in mission quest stage results -int Property CWMission04Done auto Conditional Hidden ;used by story manager, set in mission quest stage results -int Property CWMission07Done auto Conditional Hidden ;used by story manager, set in mission quest stage results - -bool Property HaafingarFortBattleComplete auto hidden ;set in CWFortSiegeFort stage 9000 -bool Property EastmarchFortBattleComplete auto hidden ;set in CWFortSiegeFort stage 9000 - -;##### Properties with pointers to things in the master file: -;### - -;## Globals ## -GlobalVariable Property CWMaxConsecutiveAttacks Auto ;this is a global variable so we can more easily tweak this setting as we play -GlobalVariable Property GameDaysPassed Auto ;Pointer to GameDaysPassed -GlobalVariable Property CWAttacker Auto ;set in StartNewCampaign() same as Attacker property -GlobalVariable Property CWDefender Auto ;set in StartNewCampaign() same as Defender property -GlobalVariable Property CWPlayerAllegiance Auto ;Global value that holds the playerAllegiance property value -GlobalVariable Property TimeScale Auto -GlobalVariable Property CWCountHoldsImperial Auto ;Holds countHoldsImperial property, set in SetHoldsImperial() function, called by SetHoldsProperty() function -GlobalVariable Property CWCountHoldsSons Auto ;Holds countHoldsImperial property, set in SetHoldsImperial() function, called by SetHoldsProperty() function -GlobalVariable Property CWContestedHold Auto ;Holds the same value as ContestedHold, used for conditions in dialogue, packages, etc. -GlobalVariable Property CWReinforcementPoolAttacker auto ;Holds the CWReinforcementControllerScript.PoolAttacker value for the current siege. -GlobalVariable Property CWReinforcementPoolDefender Auto ;Holds the CWReinforcementControllerScript.PoolAttacker value for the current siege. -GlobalVariable Property CWMissionFailDay Auto ;Holds the timestamp left before the active mission fails. Used mission journal. See CWMissionPollForFailDayScript -GlobalVariable Property CWMissionsForRank1 Auto ;Holds the number of successful missions needed for increasing the player's faction rank -GlobalVariable Property CWMissionsForRank2 Auto ;Holds the number of successful missions needed for increasing the player's faction rank -GlobalVariable Property CWMissionsForRank3 Auto ;Holds the number of successful missions needed for increasing the player's faction rank -GlobalVariable Property CWMissionsForRank4 Auto ;Holds the number of successful missions needed for increasing the player's faction rank - -GlobalVariable Property CWCountMissionsDone Auto ;DEPRECATED/OBSOLETE -- used to conditionalize story manager to allow each quest - -GlobalVariable property CWThreatBridgeImperial Auto -GlobalVariable property CWThreatBridgeSons Auto -GlobalVariable property CWThreatFenceImperial Auto -GlobalVariable property CWThreatFenceImperialArcher Auto -GlobalVariable property CWThreatFenceImperialMage Auto -GlobalVariable property CWThreatFenceSons Auto -GlobalVariable property CWThreatFenceSonsArcher Auto -GlobalVariable property CWThreatFenceSonsMage Auto -GlobalVariable property CWThreatHouseImperial Auto -GlobalVariable property CWThreatHouseSons Auto -GlobalVariable property CWThreatRockImperial Auto -GlobalVariable property CWThreatRockSons Auto -GlobalVariable property CWThreatStablesImperial Auto -GlobalVariable property CWThreatStablesSons Auto -GlobalVariable property CWThreatTowerImperial Auto -GlobalVariable property CWThreatTowerImperialArcher Auto -GlobalVariable property CWThreatTowerImperialMage Auto -GlobalVariable property CWThreatTowerSons Auto -GlobalVariable property CWThreatTowerSonsArcher Auto -GlobalVariable property CWThreatTowerSonsMage Auto -GlobalVariable property CWThreatTreeImperial Auto -GlobalVariable property CWThreatTreeSons Auto -GlobalVariable property CWThreatWallImperial Auto -GlobalVariable property CWThreatWallImperialArcher Auto -GlobalVariable property CWThreatWallImperialMage Auto -GlobalVariable property CWThreatWallSons Auto -GlobalVariable property CWThreatWallSonsArcher Auto -GlobalVariable property CWThreatWallSonsMage Auto -GlobalVariable property CWThreatWindowImperial Auto -GlobalVariable property CWThreatWindowImperialArcher Auto -GlobalVariable property CWThreatWindowImperialMage Auto -GlobalVariable property CWThreatWindowSons Auto -GlobalVariable property CWThreatWindowSonsArcher Auto -GlobalVariable property CWThreatWindowSonsMage Auto - -GlobalVariable Property CWBattlePhase Auto - -GlobalVariable Property CWPercentPoolRemainingAttacker Auto ;for use with CWReinforcementControllerScript -GlobalVariable Property CWPercentPoolRemainingDefender Auto ;for use with CWReinforcementControllerScript - -;Globals for CWObj -GlobalVariable Property CWObjEastmarch Auto -GlobalVariable Property CWObjFalkreath Auto -GlobalVariable Property CWObjHaafingar Auto -GlobalVariable Property CWObjHjaalmarch Auto -GlobalVariable Property CWObjPale Auto -GlobalVariable Property CWObjReach Auto -GlobalVariable Property CWObjRift Auto -GlobalVariable Property CWObjWhiterun Auto -GlobalVariable Property CWObjWinterhold Auto - - -;Globals for Combat Dialogue -GlobalVariable Property CWStateAttackStarted Auto -GlobalVariable Property CWStateAttackerAtGate Auto -GlobalVariable Property CWStateAttackerBrokeThrough Auto -GlobalVariable Property CWStateAttackerLowReinforcements Auto -GlobalVariable Property CWStateAttackerOutOfReinforcements Auto -GlobalVariable Property CWStateDefenderFallingBack Auto -GlobalVariable Property CWStateDefenderLastStand Auto -GlobalVariable Property CWStateDefenderLowReinforcements Auto -GlobalVariable Property CWStateDefenderOutOfReinforcements Auto - -;## Quests ## -Quest Property CWObj Auto - -Quest property CWCampaign auto -CWCampaignScript property CWCampaignS auto -Quest property CWReset auto -Quest property CWResetGarrison1 auto -Quest property CWResetGarrison2 auto -Quest property CWResetGarrison3 auto -Quest property CWResetGarrison4 auto -Quest property CWResetGarrison5 auto -Quest property CWResetGarrison6 auto -Quest property CWResetGarrison7 auto -Quest property CWResetGarrison8 auto -Quest property CWCampaignObj auto -Quest Property CWMiscObj Auto - -Quest Property CWSiegeAttackObj Auto -Quest Property CWSiegeDefendObj Auto - -CWSiegeScript Property CWSiegeS Auto -CWAlliesScript Property CWAlliesS Auto - -Quest Property CWSiegeObj Auto -Quest Property CWPrepareCity Auto - -Quest Property CWCitizensFlee Auto - -;NOTE: there used to be only one quest that was a CWFortSiege... there may be old things pointing to that specific quest, that will need to change. -;There are two because the minor capitals are using the fort siege system -Quest Property CWFortSiegeCapital Auto -Quest Property CWFortSiegeFort Auto - -Quest Property CWMission03 Auto -Quest Property CWMission04 Auto -Quest Property CWMission07 Auto - -Quest Property CWFinale Auto - -Quest Property CW00A Auto -Quest Property CW00B Auto - -Quest Property CW01A Auto -Quest Property CW01B Auto - -Quest Property CW03 Auto ;used by the CWFieldCOScript to test the quest stage to start the siege of whiterun - -Quest Property CWFin Auto - -Quest Property MQ302 Auto ;peace treaty - need to stop this if taking the second to last holds - - -WIFunctionsScript Property WIs Auto -{Pointer to WIFunctionsScript attached to WI quest} - -;## Quest Scripts ## -FavorDialogueScript Property DialogueFavorGenericS auto - -CWThreatCombatBarksScript Property CWThreatCombatBarksS Auto - - -;## Aliases ## -LocationAlias Property CWObjQuestNameLocation Auto ;see stage 1 and 2 - - -ReferenceAlias property AliasFactionLeader Auto -ReferenceAlias property AliasTullius Auto -ReferenceAlias property AliasUlfric Auto - -ReferenceAlias property ImperialFactionHQMarker Auto -ReferenceAlias property SonsFactionHQMarker Auto - -ReferenceAlias property ExiledImperialMarker Auto -ReferenceAlias property ExiledSonsMarker Auto - -ReferenceAlias Property Tullius Auto -ReferenceAlias Property Rikke Auto - -ReferenceAlias Property Ulfric Auto -ReferenceAlias Property Galmar Auto - - -ReferenceAlias Property FieldCO Auto - -ReferenceAlias Property Alias_FieldCOImperialEastmarchCamp Auto -ReferenceAlias Property Alias_FieldCOImperialEastmarchHQ Auto -ReferenceAlias Property Alias_FieldCOImperialFalkreathCamp Auto -ReferenceAlias Property Alias_FieldCOImperialFalkreathHQ Auto -ReferenceAlias Property Alias_FieldCOImperialHaafingarCamp Auto -ReferenceAlias Property Alias_FieldCOImperialHaafingarHQ Auto -ReferenceAlias Property Alias_FieldCOImperialHjaalmarchCamp Auto -ReferenceAlias Property Alias_FieldCOImperialHjaalmarchHQ Auto -ReferenceAlias Property Alias_FieldCOImperialPaleCamp Auto -ReferenceAlias Property Alias_FieldCOImperialPaleHQ Auto -ReferenceAlias Property Alias_FieldCOImperialReachCamp Auto -ReferenceAlias Property Alias_FieldCOImperialReachHQ Auto -ReferenceAlias Property Alias_FieldCOImperialRiftCamp Auto -ReferenceAlias Property Alias_FieldCOImperialRiftHQ Auto -ReferenceAlias Property Alias_FieldCOImperialWhiterunCamp Auto -ReferenceAlias Property Alias_FieldCOImperialWhiterunHQ Auto -ReferenceAlias Property Alias_FieldCOImperialWinterholdCamp Auto -ReferenceAlias Property Alias_FieldCOImperialWinterholdHQ Auto -ReferenceAlias Property Alias_FieldCOSonsEastmarchCamp Auto -ReferenceAlias Property Alias_FieldCOSonsEastmarchHQ Auto -ReferenceAlias Property Alias_FieldCOSonsFalkreathCamp Auto -ReferenceAlias Property Alias_FieldCOSonsFalkreathHQ Auto -ReferenceAlias Property Alias_FieldCOSonsHaafingarCamp Auto -ReferenceAlias Property Alias_FieldCOSonsHaafingarHQ Auto -ReferenceAlias Property Alias_FieldCOSonsHjaalmarchCamp Auto -ReferenceAlias Property Alias_FieldCOSonsHjaalmarchHQ Auto -ReferenceAlias Property Alias_FieldCOSonsPaleCamp Auto -ReferenceAlias Property Alias_FieldCOSonsPaleHQ Auto -ReferenceAlias Property Alias_FieldCOSonsReachCamp Auto -ReferenceAlias Property Alias_FieldCOSonsReachHQ Auto -ReferenceAlias Property Alias_FieldCOSonsRiftCamp Auto -ReferenceAlias Property Alias_FieldCOSonsRiftHQ Auto -ReferenceAlias Property Alias_FieldCOSonsWhiterunCamp Auto -ReferenceAlias Property Alias_FieldCOSonsWhiterunHQ Auto -ReferenceAlias Property Alias_FieldCOSonsWinterholdCamp Auto -ReferenceAlias Property Alias_FieldCOSonsWinterholdHQ Auto - -;# Aliases in OTHER quests # -LocationAlias Property CWSiegeCity Auto - -LocationAlias Property CWFortSiegeCapitalFort Auto ;fort alias in CWFortSiegeCapital - -;## Factions ## -Faction Property PlayerFaction Auto - -Faction Property CWBuddies Auto - -faction Property CWImperialFaction Auto -faction Property CWSonsFaction Auto -faction Property CWImperialFactionNPC Auto -faction Property CWSonsFactionNPC Auto - -Faction Property CWDisaffectedSoldierFaction Auto ;used for soldiers who will switch sides in CWMissions (see CWMission06 for an example) - -faction Property CrimeFactionImperial Auto ;general crime group for faction, soldiers who are attacking in a campagin should have this faction - sends criminals to faction HQ -faction Property CrimeFactionSons Auto ;general crime group for faction, soldiers who are attacking in a campagin should have this faction - sends criminals to faction HQ - -faction Property IsGuardFaction Auto - -faction Property CrimeFactionHaafingar Auto -faction Property CrimeFactionReach Auto -faction Property CrimeFactionHjaalmarch Auto -faction Property CrimeFactionWhiterun Auto -faction Property CrimeFactionFalkreath Auto -faction Property CrimeFactionPale Auto -faction Property CrimeFactionWinterhold Auto -faction Property CrimeFactionEastmarch Auto -faction Property CrimeFactionRift Auto - -faction Property CWDialogueSoldierFaction Auto -faction Property CWDialogueSoldierWaitingToAttackFaction Auto -faction Property CWDialogueSoldierWaitingToDefendFaction Auto - -faction Property CWJobFortCommanderFaction Auto -faction Property CWJobFortGatekeeperFaction Auto -faction Property CWJobFortJailorFaction Auto -faction Property CWJobFortPatrolExteriorFaction Auto - -Faction Property CWSoldierAttackerFaction Auto -Faction Property CWSoldierDefenderFaction Auto - -Faction Property CWSoldierArcherFaction Auto -Faction Property CWSoldierMageFaction Auto - -Faction Property CWSurrenderTemporaryAllies Auto - -Faction Property GovImperial Auto -Faction Property GovSons Auto - -Faction Property CWFieldCOActiveMissionFaction Auto -Faction Property CWFieldCOFailedMissionFaction Auto -Faction Property CWFieldCOHooksAcceptedFaction Auto -Faction Property CWFieldCOPotentialMission1Faction Auto -Faction Property CWFieldCOPotentialMission2Faction Auto -Faction Property CWFieldCOSuccessfulMissionFaction Auto - -Faction Property FavorAllowBribeFaction Auto - -faction Property CWRewardFactionFalkreath Auto -faction Property CWRewardFactionHjaalmarch Auto -faction Property CWRewardFactionPale Auto -faction Property CWRewardFactionReach Auto -faction Property CWRewardFactionRift Auto -faction Property CWRewardFactionWhiterun Auto -faction Property CWRewardFactionWinterhold Auto - - - -;## Locations ## - -;# Haafingar -Location property HaafingarHoldLocation auto - -Location property FortHraggstadLocation auto -Location property SolitudeLocation auto ;capital - -Location property SolitudeSawmillLocation auto -Location property KatlasFarmLocation auto -Location property DragonBridgeLocation auto - -;Location Property MilitaryCampHaafingarImperialLocation Auto -Location Property MilitaryCampHaafingarSonsLocation Auto - - -;# Reach -Location property ReachHoldLocation auto - -Location property FortSungardLocation auto -Location property MarkarthLocation auto ;capital - -Location property CidhnaMineLocation auto -Location property LeftHandMineLocation auto -Location property SalviusFarmLocation auto -Location property KarthwastenLocation auto -Location property OldHroldanLocation auto -Location property KolskeggrMineLocation auto - -Location Property MilitaryCampReachImperialLocation auto -Location Property MilitaryCampReachSonsLocation Auto - -;# Hjaalmarch -Location property HjaalmarchHoldLocation auto - -Location property FortSnowhawkLocation auto -Location property MorthalLocation auto ;capital - -Location property StonehillsLocation auto -;Location property FrostRiverFarmLocation auto ;OBSOLETE -- GONE NOT IN GAME - -Location Property MilitaryCampHjaalmarchImperialLocation auto -Location Property MilitaryCampHjaalmarchSonsLocation Auto - -;# Whiterun -Location property WhiterunHoldLocation auto - -Location property FortGreymoorLocation auto -Location property WhiterunLocation auto ;capital - -Location property BattleBornFarmLocation auto -Location property ChillfurrowFarmLocation auto -Location property PelagiaFarmLocation auto -Location property RoriksteadLocation auto -Location property RiverwoodLocation auto -;Location property BarleydarkFarmLocation auto ;OBOSETE GONE CUT FROM GAME - -Location Property MilitaryCampWhiterunImperialLocation auto -Location Property MilitaryCampWhiterunSonsLocation Auto - -;# Falkreath -Location property FalkreathHoldLocation auto - -Location property FortNeugradLocation auto -Location property FalkreathLocation auto ;capital - -;Location property GraniteHillLocation auto CUT FROM GAME -Location property HelgenLocation auto -;Location property BearsCaveMillLocation auto CUT FROM GAME -Location property HalfmoonMillLocation auto - -Location Property MilitaryCampFalkreathImperialLocation auto -Location Property MilitaryCampFalkreathSonsLocation Auto - -;# Pale -Location property PaleHoldLocation auto - -Location property FortDunstadLocation auto -Location property DawnstarLocation auto ;capital - -;Location property HeljarchenLocation auto OBSOLETE CUT FROM GAME -Location property AngasMillLocation auto -Location property LoreiusFarmLocation auto - -Location Property MilitaryCampPaleImperialLocation auto -Location Property MilitaryCampPaleSonsLocation Auto - -;# Winterhold -Location property WinterholdHoldLocation auto - -Location property FortKastavLocation auto -Location property WinterholdLocation auto ;capital - -Location property WhistlingMineLocation auto - -Location Property MilitaryCampWinterholdImperialLocation auto -Location Property MilitaryCampWinterholdSonsLocation Auto - -;# Eastmarch -Location property EastmarchHoldLocation auto - -Location property FortAmolLocation auto -Location property WindhelmLocation auto ;capital - -Location property BrandyMugFarmLocation auto -Location property HlaaluFarmLocation auto -Location property HollyfrostFarmLocation auto -Location property KynesgroveLocation auto -Location property DarkwaterCrossingLocation auto -Location property MixwaterMillLocation auto - -Location Property MilitaryCampEastmarchImperialLocation auto -;Location Property MilitaryCampEastmarchSonsLocation Auto - -;# Rift -Location property RiftHoldLocation auto - -Location property FortGreenwallLocation auto -Location property RiftenLocation auto ;capital - -Location property SnowShodFarmLocation auto -;Location property GoldenglowFarmLocation auto -- GoldenGlowFarm is NOT a normal location. It's quest specific area spawning it's own guards, and should not be part of the Civil War. -Location property MerryfairFarmLocation auto -Location property IvarsteadLocation auto -Location property ShorsStoneLocation auto -Location property HeartwoodMillLocation auto -Location property SarethiFarmLocation auto - -Location Property MilitaryCampRiftImperialLocation auto -Location Property MilitaryCampRiftSonsLocation Auto - - -;# ActorBases # - -;These are used by CWMissionScript which is used by all the CWMission quests so it's more convenient if they live here -ActorBase Property CWSoldierImperial Auto -ActorBase Property CWSoldierImperialNotGuard Auto -ActorBase Property CWSoldierSons Auto -ActorBase Property CWSoldierSonsNotGuard Auto - -ActorBase Property CWSoldierImperialNonNPCFaction Auto -ActorBase Property CWSoldierImperialNotGuardNonNPCFaction Auto -ActorBase Property CWSoldierSonsNonNPCFaction Auto -ActorBase Property CWSoldierSonsNotGuardNonNPCFaction Auto - - -ActorBase Property CWCourierImperial Auto -ActorBase Property CWCourierSons Auto -ActorBase Property CWPrisonerImperial Auto -ActorBase Property CWPrisonerSons Auto - -ActorBase Property CWPrisonerImperialA Auto -ActorBase Property CWPrisonerImperialB Auto -ActorBase Property CWPrisonerImperialC Auto -ActorBase Property CWPrisonerImperialD Auto - - -ActorBase Property CWPrisonerSonsA Auto -ActorBase Property CWPrisonerSonsB Auto -ActorBase Property CWPrisonerSonsC Auto -ActorBase Property CWPrisonerSonsD Auto - -;## Outfits ## -Outfit Property CWSoldierImperialSoldierOutfit Auto -Outfit Property CWSoldierSonsSoldierOutfit Auto - -;## MiscObjects ## -MiscObject Property Gold001 Auto ;pointer to Gold001 object - - -;## Leveled Item lists ## -LeveledItem Property CWCourierDocumentsImperial Auto ;until we have LeveledItem objects that I can point at in the editor, these are being set with GetForm() in the OnInit() block below... that needs to be removed from OnInit() block as soon as these are LeveledItem that I can set in the editor. -LeveledItem Property CWCourierDocumentsSons Auto ;until we have LeveledItem objects that I can point at in the editor, these are being set with GetForm() in the OnInit() block below... that needs to be removed from OnInit() block as soon as these are LeveledItem that I can set in the editor. - -LeveledItem Property CWRank1RewardImperial Auto ;reward player gets when gaining faction rank -LeveledItem Property CWRank2RewardImperial Auto ;reward player gets when gaining faction rank -LeveledItem Property CWRank3RewardImperial Auto ;reward player gets when gaining faction rank -LeveledItem Property CWRank4RewardImperial Auto ;reward player gets when gaining faction rank - - -LeveledItem Property CWRank1RewardSons Auto ;-intially same as imperial reward, flavored as taken from an imperial officer ;reward player gets when gaining faction rank -LeveledItem Property CWRank2RewardSons Auto ;reward player gets when gaining faction rank -LeveledItem Property CWRank3RewardSons Auto ;reward player gets when gaining faction rank -LeveledItem Property CWRank4RewardSons Auto ;reward player gets when gaining faction rank - -LeveledItem Property CWMissionReward Auto ;reward player gets after each successful mission - -LeveledItem Property CWSoldierImperialGear auto -LeveledItem Property CWSoldierSonsGear auto - -LeveledItem Property CWBearArmorPlayerReward Auto - - -;## Packages ## -Package Property CWGalmarAtCampFalkreath Auto -Package Property CWGalmarAtCampHaafingar Auto -Package Property CWGalmarAtCampHjaalmarch Auto -Package Property CWGalmarAtCampPale Auto -Package Property CWGalmarAtCampReach Auto -Package Property CWGalmarAtCampRift Auto -Package Property CWGalmarAtCampWinterhold Auto - -Package Property CWRikkeAtCampEastmarch Auto -Package Property CWRikkeAtCampFalkreath Auto -Package Property CWRikkeAtCampHjaalmarch Auto -Package Property CWRikkeAtCampPale Auto -Package Property CWRikkeAtCampReach Auto -Package Property CWRikkeAtCampRift Auto -Package Property CWRikkeAtCampWinterhold Auto - - -;## ObjectReferences ## -ObjectReference Property CWFieldCOMapTableMarkerEastmarchCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerFalkreathCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerHjaalmarchCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerPaleCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerReachCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerRiftCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerWhiterunCampImperial Auto -ObjectReference Property CWFieldCOMapTableMarkerWinterholdCampImperial Auto - -ObjectReference Property CWFieldCOMapTableMarkerFalkreathCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerHaafingarCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerHjaalmarchCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerPaleCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerReachCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerRiftCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerWhiterunCampSons Auto -ObjectReference Property CWFieldCOMapTableMarkerWinterholdCampSons Auto - -ObjectReference Property CWGarrisonEnableMarkerSonsCampFalkreath Auto - -;#### Actors #### -Actor Property UlfricRef Auto -Actor Property GeneralTulliusRef Auto - -Actor Property HadvarRef Auto -Actor Property RalofRef Auto - - -;# CWCampaignStart SendStoryEvent references - -;!!! *** !!! *** Don't forget to actually hook these up in the editor when they come on line !!! *** !!! *** -ObjectReference property CWCampaignStartMarkerReach auto -ObjectReference property CWCampaignStartMarkerHjaalmarch auto -ObjectReference property CWCampaignStartMarkerWhiterun auto -ObjectReference property CWCampaignStartMarkerFalkreath auto -ObjectReference property CWCampaignStartMarkerPale auto -ObjectReference property CWCampaignStartMarkerWinterhold auto -ObjectReference property CWCampaignStartMarkerRift auto - -ObjectReference property CWCampaignStartMarkerHaafingar auto -ObjectReference property CWCampaignStartMarkerEastmarch auto - - -;# Map Markers -;Military Camps -ObjectReference property MilitaryCampEastmarchImperialMapMarker auto -ObjectReference property MilitaryCampFalkreathImperialMapMarker auto -ObjectReference property MilitaryCampFalkreathSonsMapMarker auto -ObjectReference property MilitaryCampHaafingarSonsMapMarker auto -ObjectReference property MilitaryCampHjaalmarchImperialMapMarker auto -ObjectReference property MilitaryCampHjaalmarchSonsMapMarker auto -ObjectReference property MilitaryCampPaleImperialMapMarker auto -ObjectReference property MilitaryCampPaleSonsMapMarker auto -ObjectReference property MilitaryCampReachImperialMapMarker auto -ObjectReference property MilitaryCampReachSonsMapMarker auto -ObjectReference property MilitaryCampRiftImperialMapMarker auto -ObjectReference property MilitaryCampRiftSonsMapMarker auto -ObjectReference property MilitaryCampWhiterunImperialMapMarker auto -ObjectReference property MilitaryCampWhiterunSonsMapMarker auto -ObjectReference property MilitaryCampWinterholdImperialMapMarker auto -ObjectReference property MilitaryCampWinterholdSonsMapMarker auto - -ObjectReference Property CWGarrisonEnableMarkerImperialCampEastmarch Auto -ObjectReference Property CWGarrisonEnableMarkerSonsCampHaafingar Auto - - - -;## Keywords ## - -Keyword Property CWMissionStart Auto - -Keyword Property CWGarrison Auto -Keyword Property CWGarrisonDefenderOnly Auto - -Keyword Property CWFort Auto - -Keyword Property CWDiplomaticVictory Auto -Keyword Property CWOwner Auto -Keyword Property CWCampaignStart Auto -Keyword Property CWGovernmentStart Auto -Keyword Property CWCost Auto -Keyword Property CWCampImperial Auto -Keyword Property CWCampSons Auto -Keyword Property CWCapital Auto - - -keyword Property CWResetGarrisonStart1 Auto -keyword Property CWResetGarrisonStart2 Auto -keyword Property CWResetGarrisonStart3 Auto -keyword Property CWResetGarrisonStart4 Auto -keyword Property CWResetGarrisonStart5 Auto -keyword Property CWResetGarrisonStart6 Auto -keyword Property CWResetGarrisonStart7 Auto -keyword Property CWResetGarrisonStart8 Auto - -keyword Property CWAttackCityStart Auto -keyword Property CWEscapeCityStart Auto -keyword Property CWPrepareCityStart Auto - -keyword Property CW1PrioritySpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW2PrioritySpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW3PrioritySpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW4PrioritySpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW5PrioritySpawn Auto ;for use with CWReinforcementControllerScript - -keyword Property CW1ForcedSpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW2ForcedSpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW3ForcedSpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW4ForcedSpawn Auto ;for use with CWReinforcementControllerScript -keyword Property CW5ForcedSpawn Auto ;for use with CWReinforcementControllerScript - -Keyword Property LocTypeCity Auto -Keyword Property CWSiegeStart Auto -Keyword Property CWSiegeRunning Auto -Keyword Property CWFortSiegeSpecialStart Auto -Keyword Property CWFinaleStart Auto -Keyword Property CWFortSiegeMinorCapitalStart Auto - -Keyword Property CWResolution01Start Auto ;OBSOLETE -Keyword Property CWResolution02Start Auto ;OBSOLETE - -Keyword Property CWCitizensFleeStart Auto - -Keyword Property CWEventHappening Auto - -;## LocationRefTypes ## -LocationRefType Property CWSoldier Auto - -LocationRefType Property CWResolutionJarlMarker Auto ;used to find markers in CWAttackCity resolution quest to place Jarl, House carl, and body guards to meet the player's attempt to surrender -LocationRefType Property CWResolutionHouseCarlMarker Auto ;used to find markers in CWAttackCity resolution quest to place Jarl, House carl, and body guards to meet the player's attempt to surrender -LocationRefType Property CWResolutionJarlGuardMarker Auto ;used to find markers in CWAttackCity resolution quest to place Jarl, House carl, and body guards to meet the player's attempt to surrender - - -;## Messages ## - -;OBSOLETE: -Message Property CWCampaignWonFalkreathImperials Auto -Message Property CWCampaignWonFalkreathSons Auto -Message Property CWCampaignWonHjaalmarchImperials Auto -Message Property CWCampaignWonHjaalmarchSons Auto -Message Property CWCampaignWonPaleImperials Auto -Message Property CWCampaignWonPaleSons Auto -Message Property CWCampaignWonReachImperials Auto -Message Property CWCampaignWonReachSons Auto -Message Property CWCampaignWonRiftImperials Auto -Message Property CWCampaignWonRiftSons Auto -Message Property CWCampaignWonWhiterunImperials Auto -Message Property CWCampaignWonWhiterunSons Auto -Message Property CWCampaignWonWinterholdImperials Auto -Message Property CWCampaignWonWinterholdSons Auto -;endOBSOLETE - -Message Property CWCampaignOutcomeLostAttackMsgImperial Auto -Message Property CWCampaignOutcomeLostAttackMsgSons Auto -Message Property CWCampaignOutcomeLostDefenseMsgImperial Auto -Message Property CWCampaignOutcomeLostDefenseMsgSons Auto -Message Property CWCampaignOutcomeWonAttackMsgImperial Auto -Message Property CWCampaignOutcomeWonAttackMsgSons Auto -Message Property CWCampaignOutcomeWonDefenseMsgImperial Auto -Message Property CWCampaignOutcomeWonDefenseMsgSons Auto - - -Message Property CWCampaignTruce Auto - -;################################ ----------- Events ----------- ################################ - -Event OnInit() ;I COULD SET THESE WHEN I DECLARE THE PROPERTIES HOWEVER, MANY OF THESE ARE "DEBUG SETTINGS" AND "GAME SETTINGS" SO I PREFER TO SET THEM ALL HERE -; debug.trace("CWScript OnInit()") - log("CWScript", "OnInit()") - - ;DEBUG MODE? - debugOn.value = 0 ;Global CWDebugOn, turns on warnings - - ;OBSOLETE - ;CWDebugForceAttacker.value = 0 ;2 = Sons ;forces an attacker regardless of coin toss and # of consecutive attacks - ;CWDebugForceHold.value = 0 ;4 = Whiterun ;forces a hold to picked to be contested... might be unforced if this results in a failure to pick the hold because it breaks the rules - ;debugAllowNonAdjacentHolds = 0; ;allows attacker to attack non-adjacent holds - ;debugForceOffscreenResult = 0 ;1 ;forces each campaign to process it's result immediately offscreen - ;debugDBTraces = 1 - ;debugStartingCampaignPhase = 1 ;4 = resolution phase ;the phase that the campaign starts in, for example, you could force the campaign to always start in the resolution phase if you need to test a resolution quest - ;note: setting this to 4 and doing two consecutive campaigns may break until "DeleteWhenAble()" becomes threaded because it won't be able to start the resolution quest because it might still be running. PCB (purge cell buffers) will get around the problem - ;setting these to 1 will cause the major holds to be winable offscreen immediately - ;playerJoinedCampaginReach = 0 - ;playerJoinedCampaginWhiterun = 0 - ;playerJoinedCampaginRift = 0 - - - ;debugSkipSetOwnerCalls = 0 ;skips set owner calls, causes campaign to start much faster, will break things and is for speeding up certain kinds of playtesting - - ;debugTreatCityCapitalsAsTowns = 0 ;1 ;NOTE: FUNCTIONALITY MIGHT NO LONGER WORK -- causes Cities such as Whiterun, to be considered towns and start minor hold resolution quests - - - ;More or less obsolete... not sure if I use these anywhere, so I'm keeping them just in case - MaxAttackDelta = 20 ;-20 is treated as max in the negative as well - resolutionAttackDeltaMultiplier = 1.5 - - ;set Hold ownership at the start of the game - OwnerHaafingar = 1 - OwnerReach = 1 - OwnerHjaalmarch = 1 - OwnerWhiterun = 1 - OwnerFalkreath = 1 - OwnerPale = 2 - OwnerWinterhold = 2 - OwnerEastmarch = 2 - OwnerRift = 2 - - setInitalOwnerKeywordDataOnly() ;sets CWOwner keyword data to the numbers above - - - ;Sets the CountHoldsImperial and CountHoldsSons properties and associated globals - setCountHoldProperties() - - ;OBSOLETE?? -- set Attack Strength Value each Hold grants an adjacent contested hold (used by setStrengthPoints()) - StrValueHaafingar = 5 - StrValueReach = 5 - StrValueHjaalmarch = 3 - StrValueWhiterun = 5 - StrValueFalkreath = 3 - StrValuePale = 3 - StrValueWinterhold = 3 - StrValueEastmarch = 5 - StrValueRift = 5 - - ;set costs associated with CWCost keyword data for garrisons - iCostNonContestable = 9999 - iCostFort = 9999 ;*** I've decided to make it impossible to start off owning the fort if you are attacking the hold. The defender will not always start with the fort regardless of the attack delta. Resist the urge to change this. CWFortSiege quest (the quest you get to attack/defend a fort) makes use of the CWReinforcementControllerScript system, which ASSUMES that the attacker is the same as CW.Attacker and the defender is the same as CW.Defender. If it was possible to own the fort and be the attacker of the hold, then the CWFortSiege quest will break because it will assume the wrong thing about who is attacking/defending. - iCostSmall = 1 - iCostMedium = 2 - iCostLarge = 3 - iCostPatrol = 1 - - ;OBSOLETE? MAYBE NOT? - ;I have a vague feeling I'm using the iCostNonContestable somewhere still, so I probably shouldn't comment out this function call - setInitialCosts();establish CWCost keyword values - - ;set player campaign salary - baseSalary = 100 - SalaryMultRank1 = 1.25 - SalaryMultRank2 = 1.5 - SalaryMultRank3 = 2.0 - SalaryMultRank4 = 3.0 - - - ;OBSOLETE? - ;used by CWHoldManagerScript attached to this quest - ;RegisterForUpdate(5) - - ;*** I'm commenting this out to prevent seeing the initial log spam generated by the CWReset quest. When I can trace to seperate logs I should turn this back on - ;Note: It's strictly not needed since the original state of the game should be set up with how the enable markers are set in the esm... however, it seems safer to do a once through in Script. - ;set up the original owners of all the holds - ;setInitialOwners() - - ;needed especially if we aren't calling setInitialOwners() - initializeFortOwnerKeywordData() - - ;this starts off overrun with Forsworn there's a quest that will add it back to the war - RemoveGarrisonFromWar(KolskeggrMineLocation) - - ;starts without guards for Main Quest - RemoveGarrisonFromWar(RiverwoodLocation) - - ;Forts start with enemies in them that need to be cleared out - RemoveGarrisonFromWar(FortHraggstadLocation) - RemoveGarrisonFromWar(FortSungardLocation) - RemoveGarrisonFromWar(FortSnowhawkLocation) - RemoveGarrisonFromWar(FortGreymoorLocation) - RemoveGarrisonFromWar(FortNeugradLocation) - RemoveGarrisonFromWar(FortDunstadLocation) - RemoveGarrisonFromWar(FortKastavLocation) - RemoveGarrisonFromWar(FortAmolLocation) - RemoveGarrisonFromWar(FortGreenWallLocation) - - EnemyFortsAddedBackToWar = False ;false by default, here as a reminder - - - - ;turn off dragon attacks at Whiterun city, will be turned back on after the siege - ;WIs.DisallowDragons(WhiterunLocation) - ;** NOW HAPPENS IN WIFunctions attached to WI quest, and we won't be turning it back on - - - init += 1 ;this should never be more than 1, if > 1 it means the OnInit() has run more than once unexpectedly -EndEvent - -;auto State WaitingToStartNewCampaign -; Event OnUpdate() -; log("CWScript", "State WaitingToStartNewCampaign OnUpdate()") -; -; if debugForceOffscreenResult == 1 && WarIsActive == 1 -; GoToState("StartingNewCampaignOffscreenMode") -; log("CWScript", "WaitingToStartNewCampaign, WarIsActive == 1 & CWCampaign.IsRunning() == False, going to state StartingNewCampaignOffscreenMode.") -; -; ;### START NEW CAMPAIGN -; StartNewCampaign() -; -; elseif WarIsActive == 1 -; if CWCampaign.IsRunning() == False -; GoToState("StartingNewCampaign") -; log("CWScript", "WaitingToStartNewCampaign, WarIsActive == 1 & CWCampaign.IsRunning() == False, going to state StartingNewCampaign.") -; -; ;### START NEW CAMPAIGN -; StartNewCampaign() -; -; EndIf -; -; Else -; log("CWScript", "WaitingToStartNewCampaign, WarIsActive == 0, keep waiting.") -; -; EndIf -; -; EndEvent -; -; -;EndState -; -;State StartingNewCampaign -; Event OnUpdate() -; if CWCampaign.IsRunning() == True -; GoToState("WaitingForCampaignToFinish") -; -; log("CWScript", "StartingNewCampaign, CWCampaign.isRunning == True, going to state WaitingForCampaignToFinish.") -; -; Else -; log("CWScript", "StartingNewCampaign, CWCampaign.isRunning == False, waiting for CWCampaign to start.") -; -; endif -; -; EndEvent -; -;EndState -; -;State StartingNewCampaignOffscreenMode -; Event OnUpdate() -; log("CWScript", "StartingNewCampaignOffscreenMode state OnUpdate() is doing nothing until StartNewCampaign() function call has called ResolveOffscreen() and that function call has finished.") -; -; -; EndEvent -; -;EndState -; -;State WaitingForCampaignToFinish -; Event OnUpdate() -; -; if CWCampaign.IsRunning() == False -; GoToState("WaitingToStartNewCampaign") -; -; log("CWScript", "WaitingForCampaignToFinish, CWCampaign.IsRunning() == False, going to state WaitingToStartNewCampaign.") -; -; -; -; Else -; log("CWScript", "WaitingForCampaignToFinish, CWCampaign.IsRunning() == True, waiting for CWCampaign quest to stop.") -; -; endif -; -; EndEvent -;EndState -; -; -;State ResolvingCampaignOffscreen -; Event OnUpdate() -; log("CWScript", "ResolvingCampaignOffscreen state OnUpdate() is doing nothing until ResolveOffscreen() function call has finished.") -; -; -; EndEvent -; -;EndState - - - - - - -;################################ ----------- FUNCTIONS ----------- ################################ - -function log(string fileName, string stringToPrint, int severity = 0, bool AlwaysPrintLog = false, bool AlwaysPrintToMainLog = false) Global -{Will print to main papyrus log and the specified file if CWDebugOn global is true, or optional pararms are true} - - bool success - int debugMode = (Game.GetForm(0X0003F7D2) as GlobalVariable).GetValue() as Int ;this is the CWDebugOn global variable in the ESM. - - ;print to specified log - if debugMode == 1 || AlwaysPrintLog - debug.OpenUserLog(fileName) - -; success = debug.traceUser(fileName, " " + stringToPrint, severity) - - if success == False -; debug.trace("CWScript WARNING: log() Failed to print to " + FileName + ": " + stringToPrint, 2) - EndIf - - EndIf - - ;print to main log - if debugMode == 1 || AlwaysPrintToMainLog -; debug.trace(fileName + "-> " + stringToPrint, severity) - EndIf - -EndFunction - - - -function AddCivilWarAchievment(int whichCivilWarAchivement, Location AssociatedLocation = None) -{1 = Join a side, 2 = Take a fort in Reach or Rift, 3 = Win the war} - - log("CWScript", "AddCivilWarAchievment(" + whichCivilWarAchivement + ")") - - if whichCivilWarAchivement == 1 ;JOIN A SIDE - Game.AddAchievement(21) - elseif whichCivilWarAchivement == 2 ;TAKE FORT IN REACH OR RIFT - if AssociatedLocation == FortSungardLocation || AssociatedLocation == FortGreenwallLocation - Game.AddAchievement(22) - EndIf - - elseif whichCivilWarAchivement == 3 ;WIN THE WAR - Game.AddAchievement(23) - EndIf - -EndFunction - - -;OBSOLETE - from when there was multiple campaigns running at the same time -function modObjectiveByEnemySoldierDeath(Actor DeadSoldier, int AmountToMod = 1, Location Hold = None) - log("CWScript", "modObjectiveByEnemySoldierDeath(" + DeadSoldier + ")") - - if IsPlayerInMyFaction(DeadSoldier) - log("CWScript", "modObjectiveByEnemySoldierDeath(" + DeadSoldier + ") is in same faction as player. Ignored.") - - Else - log("CWScript", "modObjectiveByEnemySoldierDeath(" + DeadSoldier + ") Will find the hold, mod the appropriate CWObjXXX, and update the approprirate objective") - - location myHold - - if Hold == None - myHold = GetMyCurrentHoldLocation(DeadSoldier) - - Else - MyHold = Hold - EndIf - - int myHoldID = GetHoldID(myHold) - GlobalVariable myCWObjGlobal = GetCWObjGlobal(myHoldID) - - modCWObjGlobal(myCWObjGlobal, AmountToMod) - - log("CWScript", "modObjectiveByEnemySoldierDeath(" + DeadSoldier + ") Calling updateObjective with the hold location found for " + DeadSoldier) - updateObjective(myHold) - - EndIf - -EndFunction - -;OBSOLETE - from when there was multiple campaigns running at the same time -function modObjectiveBySabotage(ResourceObjectScript ResourceObject, int AmountToMod = 5) - log("CWScript", "modObjectiveBySabotage(" + ResourceObject + ")") - - location myHold = GetMyCurrentHoldLocation(ResourceObject) - - if myHold.GetKeywordData(CWOwner) == PlayerAllegiance - log("CWScript", "modObjectiveBySabotage(" + ResourceObject + ") is in hold owned by faction the player is allied to. Ignored.") - - Else - log("CWScript", "modObjectiveBySabotage(" + ResourceObject + ") Will mod the appropriate CWObjXXX, and update the approprirate objective") - - - int myHoldID = GetHoldID(myHold) - GlobalVariable myCWObjGlobal = GetCWObjGlobal(myHoldID) - - modCWObjGlobal(myCWObjGlobal, AmountToMod) - - log("CWScript", "modObjectiveBySabotage(" + ResourceObject + ") Calling updateObjective with the hold location found for " + ResourceObject) - updateObjective(myHold) - - EndIf - -EndFunction - -;OBSOLETE - from when there was multiple campaigns running at the same time -function modObjectiveByMissionSuccess(Location HoldLocation, int AmountToMod = 25) - log("CWScript", "modObjectiveByMissionSuccess(" + HoldLocation + ", " + AmountToMod + ")") - - ;bailout if the hold is owned by the players Faction - ;this way you can still get missions in holds you control - we will try this, might not ship with it - if GetOwner(HoldLocation) == PlayerAllegiance - log("CWScript", "modObjectiveByMissionSuccess(" + HoldLocation + ") hold is owned by player's faction, bailing out before modding the objective") - Return - EndIf - - - int myHoldID = GetHoldID(HoldLocation) - GlobalVariable myCWObjGlobal = GetCWObjGlobal(myHoldID) - - modCWObjGlobal(myCWObjGlobal, AmountToMod) - - log("CWScript", "modObjectiveByMissionSuccess() Calling updateObjective(" + HoldLocation +")" ) - updateObjective(HoldLocation) - - -EndFunction - -;OBSOLETE - from when there was multiple campaigns running at the same time -function modCWObjGlobal(GlobalVariable GlobalToModify, float amountToAdd) - float CWObjVal = (GlobalToModify.GetValue() as int + amountToAdd) as int - - ;cap at 99% - - if CWObjVal > 99 - CWObjVal = 99.0 - EndIf - - log("CWScript", "modCWObjGlobal() Calling OBSOLETE NOT INCREMENTING GLOBAL()", 1 ) -; GlobalToModify.SetValue(CWObjVal) - -EndFunction - - -function completeCWObj(Location HoldWhoseObjectiveToComplete) - int myHoldID = GetHoldID(HoldWhoseObjectiveToComplete) - GlobalVariable myCWObjGlobal = GetCWObjGlobal(myHoldID) - - ;if this is the first Whiterun siege (we assume this because the whiterun siege is always the first one) - if WhiterunSiegeFinished == False - WhiterunSiegeFinished = True - displayFactionLeaderObjective() - - ;This is a little awkward, as it causes the objective to display for the first time completed - ;but it prevents the problem of getting the Whiterun Objective again in stage 4 of CW Script - myCWObjGlobal.setValue(100) - updateObjective(HoldWhoseObjectiveToComplete, MarkObjectiveComplete = True) - - else - myCWObjGlobal.setValue(100) - updateObjective(HoldWhoseObjectiveToComplete, MarkObjectiveComplete = True) - - EndIf - -EndFunction - -;OBSOLETE - from when there was multiple campaigns running at the same time -function failCWObj(Location HoldWhoseObjectiveToFail) - int myHoldID = GetHoldID(HoldWhoseObjectiveToFail) - GlobalVariable myCWObjGlobal = GetCWObjGlobal(myHoldID) - - ;if this is the first Whiterun siege (we assume this because the whiterun siege because that is always the first one) - if WhiterunSiegeFinished == False - WhiterunSiegeFinished = True - displayFactionLeaderObjective() - - else - updateObjective(HoldWhoseObjectiveToFail, FailObjective = True, GlobalToResetDueToFailure = myCWObjGlobal) - myCWObjGlobal.setValue(0) - updateObjective(HoldWhoseObjectiveToFail) - - EndIf - -EndFunction - - -function updateObjective(location HoldLocationWhoseObjectiveWeShouldUpdate, bool MarkObjectiveComplete = false, bool FailObjective = false, GlobalVariable GlobalToResetDueToFailure = None) -{This sets the global and flashes the objective for taking over the hold for the supplied location} - - if (PlayerInvolved == 1 && WarIsActive == 1) == false - log("CWScript", "updateObjective() PlayerInvolved or WarIsActive, is not 1, NOT updating the objective." ) - - Return - - EndIf - - - ;note: this works because in the CWObj quest are objectives with the following formula: - ;x0y where x is the number of the hold, and y is the number for the players Faction - - int HoldID = GetHoldID(HoldLocationWhoseObjectiveWeShouldUpdate) - - int Obj = 100 * HoldID - Obj += PlayerAllegiance - - if CWObj.IsObjectiveCompleted(Obj) - ;do nothing - - Else - - if MarkObjectiveComplete == True - CWObj.SetObjectiveCompleted(Obj) - displayFactionLeaderObjective() - - ElseIf FailObjective == True - - ;Fail it - CWObj.SetObjectiveFailed(Obj) - - ;reset the percentage to completion - GlobalToResetDueToFailure.SetValue(0) - - ;reshow it - CWObj.SetObjectiveFailed(Obj, True) - CWObj.SetObjectiveDisplayed(Obj, abDisplayed = true, abForce = true) - - displayFactionLeaderObjective() - - else - - CWObj.UpdateCurrentInstanceGlobal(GetCWObjGlobal(HoldID)) - CWObj.SetObjectiveDisplayed(Obj, abDisplayed = true, abForce = true) - - EndIf - endif - -EndFunction - - -function displayFactionLeaderObjective() - int talkToLeaderObj = 1000 + PlayerAllegiance ;objective 1001 / 1002 is Report to Tullius / Ulfric - - CWObj.setStage(1) ; for journal entry - - ;because i want this to recur every time you finish taking a hold, set it not to be complete, then display it again - CWObj.SetObjectiveCompleted(talkToLeaderObj, false) - CWObj.SetObjectiveDisplayed(talkToLeaderObj, abDisplayed = true, abForce = true) - - CWObj.SetActive() - -EndFunction - -function DisplayHoldObjective() -;THIS HANDLES THE NEW LINEAR STYLE CAMPAIGN OBJECTIVES - - log("CWScript", "DisplayHoldObjective()") - - - ;***THIS LOGIC MUST BE IDENTICAL TO THE STACK OF DIALOGUE IN THE CW DIALOGUE WHERE Tullis/Ulfric TELL YOU WHERE TO GO NEXT *** - if PlayerAllegiance == iImperials - if getOwner(PaleHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(PaleHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Elseif getOwner(RiftHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(RiftHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Elseif getOwner(WinterholdHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(WinterholdHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Elseif getOwner(HjaalmarchHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(HjaalmarchHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Elseif getOwner(FalkreathHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(FalkreathHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Elseif getOwner(ReachHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(ReachHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Elseif getOwner(EastmarchHoldLocation) != iImperials - CWObj.SetObjectiveDisplayed(100 * GetHoldID(EastmarchHoldLocation) + iImperials, abDisplayed = true, abForce = true) - - Else - - EndIf - - elseif PlayerAllegiance == iSons - - if getOwner(FalkreathHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(FalkreathHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Elseif getOwner(ReachHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(ReachHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Elseif getOwner(HjaalmarchHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(HjaalmarchHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Elseif getOwner(PaleHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(PaleHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Elseif getOwner(WinterholdHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(WinterholdHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Elseif getOwner(RiftHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(RiftHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Elseif getOwner(HaafingarHoldLocation) != iSons - CWObj.SetObjectiveDisplayed(100 * GetHoldID(HaafingarHoldLocation) + iSons, abDisplayed = true, abForce = true) - - Else - - EndIf - - - Else - - - EndIf - - CWObj.SetActive() - -EndFunction - - -string Function FactionName(int CWFaction) - if CWFaction == iImperials - return "Imperials" - - elseif CWFaction == iSons - return "Sons" - ElseIf CWFaction == iBothFactions - return "Both Factions" - - Else - return "unknown faction(" + CWFaction + ")" - EndIf - - -EndFunction - -string Function HoldName(int HoldNumber) -{Returns a string based on the HoldNumber. Corresponds with iWhiterun, iRift, etc. Not for use to display to player. Just for sending to debug traces where you have a number refering to a hold.} - - if HoldNumber == iHaafingar ;1 - return "Haafingar" - - elseif HoldNumber == iReach ;2 - return "Reach" - - elseif HoldNumber == iHjaalmarch ;3 - return "Hjaalmarch" - - elseif HoldNumber == iWhiterun ;4 - return "Whiterun" - - elseif HoldNumber == iFalkreath ;5 - return "Falkreath" - - elseif HoldNumber == iPale ;6 - return "Pale" - - elseif HoldNumber == iWinterhold ;7 - return "Winterhold" - - elseif HoldNumber == iEastmarch ;8 - return "Eastmarch" - - elseif HoldNumber == iRift ;9 - return "Rift" - Else - return "unknown hold" - EndIf - -EndFunction - - -faction Function getFaction(int FactionToReturn, bool ReturnNPCFaction = false) -{Takes an int and returns the appropriate faction (1 = Imperials, 2 = Sons), ReturnNPCFaction returns the NPC faction that makes them hostile to members of the opposite NPC faction} - if FactionToReturn == iImperials - if ReturnNPCFaction == false - return CWImperialFaction - else - return CWImperialFactionNPC - endif - - elseif FactionToReturn == iSons - if ReturnNPCFaction == false - return CWSonsFaction - else - return CWSonsFactionNPC - endif - - Else - return None - log("CWScript", " WARNING: getFaction() encountered an unknown FactionToReturn. Expected 1 or 2, got " + FactionToReturn, 2, true, True) - - EndIf - -EndFunction - -faction function getPlayerAllegianceFaction(bool ReturnNPCFaction = false) - return getFaction(PlayerAllegiance, ReturnNPCFaction) -EndFunction - -faction Function getPlayerAllegianceEnemyFaction(bool ReturnNPCFaction = false) - return getFaction(getOppositeFactionInt(PlayerAllegiance), ReturnNPCFaction) -EndFunction - -int Function getOppositeFactionInt(int FactionWhoseOppositeYouWant) - - int returnVal - - if FactionWhoseOppositeYouWant == iImperials - returnVal = iSons - - ElseIf FactionWhoseOppositeYouWant == iSons - returnVal = iImperials - Else - log("CWScript", " WARNING: getOppositeFactionInt() encountered an unknown FactionWhoseOppositeYouWant. Expected 1 or 2, got " + FactionWhoseOppositeYouWant, 2, True, True) - - EndIf - - return returnVal - -EndFunction - -Actor Function GetRikkeOrGalmar(int iFaction = -1) -{Returns Rikke if iFaction == 1, or Galmar if iFaction == 2, uses PlayerAllegiance if iFaction == -1 (default)} - - Log("CWScript", "GetRikkeOrGalmar(" + iFaction +")") - - Actor ReturnRef - - if iFaction == -1 - iFaction = PlayerAllegiance - EndIf - - if iFaction == 1 - ReturnRef = Rikke.GetActorReference() - elseif iFaction == 2 - ReturnRef = Galmar.GetActorReference() - Else - log("CWScript", " WARNING: GetRikkeOrGalmar() encountered an unknown iFaction. Expected 1 or 2, got " + iFaction, 2, True, True) - EndIf - - Log("CWScript", "GetRikkeOrGalmar() returning:" + ReturnRef) - - return returnRef - - - -EndFunction - -bool function CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(Actor ActorToCheck, Package PackageToCheck, Location LocationToCheck, ObjectReference MarkerToMoveTo) - Log("CWScript", "CheckRikkeGalmarNotAtCampPackageLocation(" + ActorToCheck + PackageToCheck + LocationToCheck +")") - - bool returnVal - - if ActorToCheck.GetCurrentPackage() == PackageToCheck && ActorToCheck.IsInLocation(LocationToCheck) == False - Log("CWScript", "CheckRikkeGalmarNotAtCampPackageLocation MOVING ACTOR and Returning TRUE because is in package but not in location" ) - ActorToCheck.MoveTo(MarkerToMoveTo) - returnVal = True - - Else - Log("CWScript", "CheckRikkeGalmarNotAtCampPackageLocation Returning FALSE because is either not in package, or in package and in location.") - returnVal = False - - EndIf - - return returnVal - -EndFunction - -Function MoveRikkeGalmarToCampIfNeeded(bool CheckIfUnloaded = False) -{Moves them to the proper camp if not already there and, if not in the same location as the player.} -;When called by Rikke/Galmar's OnUnload block, CheckIfUnloaded == false, when called by their OnPackageChange block it is True - - Log("CWScript", "MoveRikkeGalmarToCampIfNeeded()") - - if WarIsActive == 1 && GetStageDone(4) - - if PlayerAllegiance == iImperials - Log("CWScript", "MoveRikkeGalmarToCampIfNeeded() player is Imperial, checking Rikke") - - Actor RikkeActor = Rikke.GetActorReference() - Package CurrentPackage = RikkeActor.GetCurrentPackage() - - if CheckIfUnloaded - If RikkeActor.Is3DLoaded() - Log("CWScript", "MoveRikkeGalmarToCampIfNeeded() CheckIfUnloaded == true, and Rikke has 3D so skip this.") - return - EndIf - EndIf - - if CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampPale, MilitaryCampPaleImperialLocation, CWFieldCOMapTableMarkerPaleCampImperial) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampRift, MilitaryCampRiftImperialLocation, CWFieldCOMapTableMarkerRiftCampImperial) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampWinterhold, MilitaryCampWinterholdImperialLocation, CWFieldCOMapTableMarkerWinterholdCampImperial) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampHjaalmarch, MilitaryCampHjaalmarchImperialLocation, CWFieldCOMapTableMarkerHjaalmarchCampImperial) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampFalkreath, MilitaryCampFalkreathImperialLocation, CWFieldCOMapTableMarkerFalkreathCampImperial) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampReach, MilitaryCampReachImperialLocation, CWFieldCOMapTableMarkerReachCampImperial) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(RikkeActor, CWRikkeAtCampEastmarch, MilitaryCampEastmarchImperialLocation, CWFieldCOMapTableMarkerEastmarchCampImperial) - EndIf - - - elseif PlayerAllegiance == iSons - Log("CWScript", "MoveRikkeGalmarToCampIfNeeded() player is Sons, checking Galmar") - - Actor GalmarActor = Galmar.GetActorReference() - Package CurrentPackage = GalmarActor.GetCurrentPackage() - - if CheckIfUnloaded - If GalmarActor.Is3DLoaded() - Log("CWScript", "MoveGalmarGalmarToCampIfNeeded() CheckIfUnloaded == true, and Galmar has 3D so skip this.") - return - EndIf - EndIf - - Log("CWScript", "MoveGalmarGalmarToCampIfNeeded() calling EvaluatePackage() on Galmar") - GalmarActor.EvaluatePackage() - - if CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampFalkreath, MilitaryCampFalkreathSonsLocation, CWFieldCOMapTableMarkerFalkreathCampSons) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampReach, MilitaryCampReachSonsLocation, CWFieldCOMapTableMarkerReachCampSons) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampHjaalmarch, MilitaryCampHjaalmarchSonsLocation, CWFieldCOMapTableMarkerHjaalmarchCampSons) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampPale, MilitaryCampPaleSonsLocation, CWFieldCOMapTableMarkerPaleCampSons) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampWinterhold, MilitaryCampWinterholdSonsLocation, CWFieldCOMapTableMarkerWinterholdCampSons) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampRift, MilitaryCampRiftSonsLocation, CWFieldCOMapTableMarkerRiftCampSons) - elseif CheckRikkeGalmarNotAtCampPackageLocationAndMoveIfNeeded(GalmarActor, CWGalmarAtCampHaafingar, MilitaryCampHaafingarSonsLocation, CWFieldCOMapTableMarkerHaafingarCampSons) - EndIf - - Else - Log("CWScript", "MoveRikkeGalmarToCampIfNeeded() player is Neither Imperial nor Sons, not checking Rikke or Galmar") - - EndIf - - Else - - Log("CWScript", "MoveRikkeGalmarToCampIfNeeded() WarIsActive == false or GetStageDone(4) == false, not checking.") - - EndIf - - - -EndFunction - - - -GlobalVariable Function GetCWObjGlobal(int HoldNumber) -{Returns a string based on the HoldNumber. Corresponds with iWhiterun, iRift, etc. Not for use to display to player. Just for sending to debug traces where you have a number refering to a hold.} - - if HoldNumber == iHaafingar ;1 - return CWObjHaafingar - - elseif HoldNumber == iReach ;2 - return CWObjReach - - elseif HoldNumber == iHjaalmarch ;3 - return CWObjHjaalmarch - - elseif HoldNumber == iWhiterun ;4 - return CWObjWhiterun - - elseif HoldNumber == iFalkreath ;5 - return CWObjFalkreath - - elseif HoldNumber == iPale ;6 - return CWObjPale - - elseif HoldNumber == iWinterhold ;7 - return CWObjWinterhold - - elseif HoldNumber == iEastmarch ;8 - return CWObjEastmarch - - elseif HoldNumber == iRift ;9 - return CWObjRift - EndIf - -EndFunction - - -int Function GetActorAllgeiance(Actor ActorToCheck) -{Returns an integer correlating to the Civil War faction the actor belongs 1 = in faction CWImperialFaction, 2 = in faction CWSonsFaction} - - if ActorToCheck.IsInFaction(CWImperialFaction) || ActorToCheck.IsInFaction(GovImperial) - return iImperials - - ElseIf ActorToCheck.IsInFaction(CWSonsFaction) || ActorToCheck.IsInFaction(GovSons) - return iSons - - Else - log("CWScript", "GetActorAllgeiance() ActorToCheck(" + ActorToCheck + ") is neither in CWImperialFaction nor CWImperialFaction.", 1) - return -1 - - EndIf - -EndFunction - -bool function isImperial(Actor ActorToCheck) - return GetActorAllgeiance(ActorToCheck) == iImperials - -EndFunction - -bool function isSons(Actor ActorToCheck) - return GetActorAllgeiance(ActorToCheck) == iSons - -EndFunction - -bool function IsPlayerInMyFaction(Actor ActorToCheck) -{Returns true if the actor is in the same CWFaction as the player} - log("CWScript", "IsPlayerInMyFaction() ActorToCheck(" + ActorToCheck + ")") - - bool returnVal = GetActorAllgeiance(ActorToCheck) == GetActorAllgeiance(Game.GetPlayer()) - - log("CWScript", "IsPlayerInMyFaction() returning: " + returnVal) - - return returnVal - -EndFunction - - -Function SetPlayerAllegiance(int FactionToJoin, int MakePlayerInvolved = 0) -{Takes an int for which faction the player should join. 1 = Imperials, 2 = Sons. Swaps player in/out of factions, and sets the playerInvolved flag if the optional parameter is set to 1, and PlayerAllegiance properties.} - - ;set quest properies - playerInvolved = MakePlayerInvolved - playerAllegiance = FactionToJoin - CWPlayerAllegiance.value = FactionToJoin - - if FactionToJoin == iImperials - ;swap factions - Game.GetPlayer().AddToFaction(getFaction(iImperials)) - Game.GetPlayer().RemoveFromFaction(getFaction(iSons)) - - ;swap FactionLeader alias - AliasFactionLeader.ForceRefTo(AliasTullius.GetReference()) - - elseif FactionToJoin == iSons - Game.GetPlayer().AddToFaction(getFaction(iSons)) - Game.GetPlayer().RemoveFromFaction(getFaction(iImperials)) - - ;swap FactionLeader alias - AliasFactionLeader.ForceRefTo(AliasUlfric.GetReference()) - Else - log("CWScript", "SetPlayerAllegiance() encountered an unknown FactionToJoin. Expect 1 or 2, got " + FactionToJoin) - EndIf - - log("CWScript", "SetPlayerAllegiance() setting players allegiance to " + FactionToJoin + "(" + FactionName(FactionToJoin) + ")") - -EndFunction - - -function pacifyAliasForSurrender(ReferenceAlias RefAliasToPacify) - - ;MAKE SURE YOU PUT THE PLAYER in CWSurrenderTemporaryAllies BEFORE YOU CALL THIS - - log("CWScript", "pacifyAliasForSurrender(" + RefAliasToPacify + ")") - - Actor ActorRef = RefAliasToPacify.GetActorReference() - ClearActorsEnemyFlagOnCrimeFactions(ActorRef) - ActorRef.AddToFaction(CWSurrenderTemporaryAllies) - ActorRef.StopCombatAlarm() - Game.GetPlayer().StopCombatAlarm() - ActorRef.StopCombat() - -EndFunction - - -function ClearAliasEnemyFlagOnCrimeFactions(ReferenceAlias AliasWhoseCrimeFactionShouldClearPlayerEnemyFlag) - log("CWScript", "ClearActorsEnemyFlagOnCrimeFactions(" + AliasWhoseCrimeFactionShouldClearPlayerEnemyFlag + ") will call ClearActorsEnemyFlagOnCrimeFactions()") - - ClearActorsEnemyFlagOnCrimeFactions(AliasWhoseCrimeFactionShouldClearPlayerEnemyFlag.GetActorReference()) - -EndFunction - - -function ClearActorsEnemyFlagOnCrimeFactions(Actor ActorWhoseCrimeFactionShouldClearPlayerEnemyFlag) - Faction myCrimeFaction = ActorWhoseCrimeFactionShouldClearPlayerEnemyFlag.GetCrimeFaction() - - log("CWScript", "ClearActorsEnemyFlagOnCrimeFactions(" + ActorWhoseCrimeFactionShouldClearPlayerEnemyFlag + ") clearing player enemy flag on faction: " + myCrimeFaction ) - - if myCrimeFaction - myCrimeFaction.SetPlayerEnemy(false) - EndIf - -EndFunction - - - - - -Function PlayerTookOath(int iFaction) - log("CWScript", "PlayerTookOath(" + iFaction + ")") - - if iFaction == iImperials - CW00A.setObjectiveCompleted(1) - - CW00B.setObjectiveFailed(2) - CW01B.setStage(999) - - - elseif iFaction == iSons - CW00B.setObjectiveCompleted(2) - - CW00A.setObjectiveFailed(1) - CW01A.setStage(999) - - EndIf - - - ;turn off introductory quests: - CW00A.stop() - CW00B.stop() - - -EndFunction - - -Location Function GetMyCurrentHoldLocation(ObjectReference RefToGetCurrentHoldFor) -{Returns a location corresponding to the location of the hold the actor is currently in} - - Location returnLocation - - if RefToGetCurrentHoldFor.IsInLocation(HaafingarHoldLocation) - returnLocation = HaafingarHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(ReachHoldLocation) - returnLocation = ReachHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(HjaalmarchHoldLocation) - returnLocation = HjaalmarchHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(WhiterunHoldLocation) - returnLocation = WhiterunHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(FalkreathHoldLocation) - returnLocation = FalkreathHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(PaleHoldLocation) - returnLocation = PaleHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(WinterholdHoldLocation) - returnLocation = WinterholdHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(EastmarchHoldLocation) - returnLocation = EastmarchHoldLocation - - Elseif RefToGetCurrentHoldFor.IsInLocation(RiftHoldLocation) - returnLocation = RiftHoldLocation - - Else - - log("CWScript", " WARNING: GetMyCurrentHoldLocation(" + RefToGetCurrentHoldFor + ") could NOT find the actor is in any hold location.", 2, true, true) - - EndIf - - log("CWScript", "GetMyCurrentHoldLocation(" + RefToGetCurrentHoldFor + ") RETURNING: " + returnLocation) - - return returnLocation - - -EndFunction - -Location Function GetMyEditorLocationHoldLocation(ObjectReference RefToGetEditorLocHoldFor) -{Returns a location corresponding to the location of the hold the actor's editor location currently in} - - Location EditorLocation = RefToGetEditorLocHoldFor.GetEditorLocation() - Location returnLocation - - If HaafingarHoldLocation.IsChild(EditorLocation) - returnLocation = HaafingarHoldLocation - - ElseIf ReachHoldLocation.IsChild(EditorLocation) - returnLocation = ReachHoldLocation - - ElseIf HjaalmarchHoldLocation.IsChild(EditorLocation) - returnLocation = HjaalmarchHoldLocation - - ElseIf WhiterunHoldLocation.IsChild(EditorLocation) - returnLocation = WhiterunHoldLocation - - ElseIf FalkreathHoldLocation.IsChild(EditorLocation) - returnLocation = FalkreathHoldLocation - - ElseIf PaleHoldLocation.IsChild(EditorLocation) - returnLocation = PaleHoldLocation - - ElseIf WinterholdHoldLocation.IsChild(EditorLocation) - returnLocation = WinterholdHoldLocation - - ElseIf EastmarchHoldLocation.IsChild(EditorLocation) - returnLocation = EastmarchHoldLocation - - ElseIf RiftHoldLocation.IsChild(EditorLocation) - returnLocation = RiftHoldLocation - - Else - - log("CWScript", " WARNING: GetMyEditorLocationHoldLocation(" + RefToGetEditorLocHoldFor + ") could NOT find the actor's editor location is in any hold location.", 2, true, true) - - EndIf - - log("CWScript", "GetMyEditorLocationHoldLocation(" + RefToGetEditorLocHoldFor + ") RETURNING: " + returnLocation) - - return returnLocation - - -EndFunction - - -Faction function GetCrimeFactionForActorFaction(Actor ActorToCheck) - - log("CWScript", "GetCrimeFactionForActorFaction(" + ActorToCheck + ") will GetActorAllgeiance() and the return crime faction based on what was returned") - - int myAllegiance = GetActorAllgeiance(ActorToCheck) - - Faction returnFaction - - if myAllegiance == iImperials - returnFaction = CrimeFactionImperial - - elseif myAllegiance == iSons - returnFaction = CrimeFactionSons - - Else - log("CWScript", " WARNING: GetCrimeFactionForActorFaction(" + ActorToCheck + ") is neither Imperial nor Sons, returning NONE)" , 2, true, true) - - EndIf - - log("CWScript", "GetCrimeFactionForActorFaction(" + ActorToCheck + ") returning:" + returnFaction) - - return returnFaction - -EndFunction - -Faction Function GetCrimeFactionForHold(Location HoldLocation) - {Returns the normal crime faction for the hold} - - log("CWScript", "GetCrimeFactionForHold(" + HoldLocation + ")") - - Faction ReturnFaction - - If HoldLocation == HaafingarHoldLocation - returnFaction = CrimeFactionHaafingar - ElseIf HoldLocation == ReachHoldLocation - returnFaction = CrimeFactionReach - ElseIf HoldLocation == HjaalmarchHoldLocation - returnFaction = CrimeFactionHjaalmarch - ElseIf HoldLocation == WhiterunHoldLocation - returnFaction = CrimeFactionWhiterun - ElseIf HoldLocation == FalkreathHoldLocation - returnFaction = CrimeFactionFalkreath - ElseIf HoldLocation == PaleHoldLocation - returnFaction = CrimeFactionPale - ElseIf HoldLocation == WinterholdHoldLocation - returnFaction = CrimeFactionWinterhold - ElseIf HoldLocation == EastmarchHoldLocation - returnFaction = CrimeFactionEastmarch - ElseIf HoldLocation == RiftHoldLocation - returnFaction = CrimeFactionRift - - Else - - log("CWScript", " WARNING: GetCrimeFactionForHold(" + HoldLocation + ") found an unexpected location that isn't a known hold.", 2, true, true) - - EndIf - - log("CWScript", "GetCrimeFactionForHold(" + HoldLocation + ") RETURNING: " + ReturnFaction) - - return ReturnFaction - -EndFunction - -function ClearHoldCrimeGold(Location HoldLocation) - - log("CWScript", "ClearHoldCrimeGold(" + HoldLocation + ") clearing crime gold.") - - faction crimeFaction = GetCrimeFactionForHold(HoldLocation) - - crimeFaction.SetCrimeGold(0) - crimeFaction.SetCrimeGoldViolent (0) - - -EndFunction - -function setCrimeFactionOnActorForEditorLocationsHold(Actor ActorToSetCrimeFaction) -{Finds the hold of the actor's editor location, then adds and sets the appropriate crime faction} - - log("CWScript", "setCrimeFactionOnActorForEditorLocationsHold(" + ActorToSetCrimeFaction + ")") - - Location myHold = GetMyEditorLocationHoldLocation(ActorToSetCrimeFaction) - Faction myCrimeFaction = GetCrimeFactionForHold(myHold) - - log("CWScript", "setCrimeFactionOnActorForEditorLocationsHold(" + ActorToSetCrimeFaction + ") will set crime faction to be " + myCrimeFaction) - - ActorToSetCrimeFaction.SetCrimeFaction(myCrimeFaction) - -EndFunction - -function DetermineAndSetCrimeFactionForSoldierActor(Actor ActorRef) - - log("CWScript", "DetermineAndSetCrimeFactionForSoldierActor(" + ActorRef + ") will determine my hold.") - - Location myHold = GetMyEditorLocationHoldLocation(ActorRef) - - log("CWScript", "DetermineAndSetCrimeFactionForSoldierActor(" + ActorRef + ") myHold = " + myHold + " now will determine if I am a defender or attacker and get my crime faction.") - - faction myCrimeFaction - - ;DON'T SET CRIME FACTION FOR FORT SOLDIERS ANY MORE - location ActorLocation = ActorRef.GetEditorLocation() - if ActorLocation.HasKeyword(CWFort) - log("CWScript", "DetermineAndSetCrimeFactionForSoldierActor(" + ActorRef + ") location is a CWFort, NOT CHANGING CRIME FACTION. Location: " + ActorLocation) - RETURN - endif - - - if IsActorDefender(ActorRef, myHold) - myCrimeFaction = GetCrimeFactionForHold(myHold) - - ElseIf IsActorAttacker(ActorRef, myHold) - myCrimeFaction = GetCrimeFactionForActorFaction(ActorRef) - - Else - log("CWScript", " WARNING: ActorRef is neither attacker nor defender!!! DetermineAndSetCrimeFactionForSoldierActor(" + ActorRef + ")", 2, true, true) - - EndIf - - log("CWScript", "DetermineAndSetCrimeFactionForSoldierActor(" + ActorRef + ") will set crime faction to: " + myCrimeFaction) - - ActorRef.SetCrimeFaction(myCrimeFaction) - - log("CWScript", "DetermineAndSetCrimeFactionForSoldierActor(" + ActorRef + ") double checking GetCrimeFaction():" + ActorRef.GetCrimeFaction()) - -EndFunction - -Location Function GetMyParentHoldLocation(Location LocationToGetParentHoldFor) -{Returns a location corresponding to the location of the hold the actor is currently in} - - Location returnLocation - - If HaafingarHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = HaafingarHoldLocation - - ElseIf ReachHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = ReachHoldLocation - - ElseIf HjaalmarchHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = HjaalmarchHoldLocation - - ElseIf WhiterunHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = WhiterunHoldLocation - - ElseIf FalkreathHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = FalkreathHoldLocation - - ElseIf PaleHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = PaleHoldLocation - - ElseIf WinterholdHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = WinterholdHoldLocation - - ElseIf EastmarchHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = EastmarchHoldLocation - - ElseIf RiftHoldLocation.IsChild(LocationToGetParentHoldFor) - returnLocation = RiftHoldLocation - - Else - - log("CWScript", " WARNING: GetMyParentHoldLocation(" + LocationToGetParentHoldFor + ") could NOT find the actor's editor location is in any hold location.", 2, true, true) - - EndIf - - log("CWScript", "GetMyParentHoldLocation(" + LocationToGetParentHoldFor + ") RETURNING: " + returnLocation) - - return returnLocation - -EndFunction - - - -Location Function GetCapitalLocationForHold(Location HoldLocation) -{Returns a location corresponding to the capital location of the hold location} - - Location returnLocation - - if HoldLocation == HaafingarHoldLocation - returnLocation = SolitudeLocation - - elseif HoldLocation == ReachHoldLocation - returnLocation = MarkarthLocation - - elseif HoldLocation == HjaalmarchHoldLocation - returnLocation = MorthalLocation - - elseif HoldLocation == WhiterunHoldLocation - returnLocation = WhiterunLocation - - elseif HoldLocation == FalkreathHoldLocation - returnLocation = FalkreathLocation - - elseif HoldLocation == PaleHoldLocation - returnLocation = DawnstarLocation - - elseif HoldLocation == WinterholdHoldLocation - returnLocation = WinterholdLocation - - elseif HoldLocation == EastmarchHoldLocation - returnLocation = WindhelmLocation - - elseif HoldLocation == RiftHoldLocation - returnLocation = RiftenLocation - - EndIf - - log("CWScript", "GetCapitalLocationForHold(" + HoldLocation + ") RETURNING: " + returnLocation) - - return returnLocation - -EndFunction - -location function GetCampLocationForHold(Location Hold, int GetCampForThisFaction) - - location ReturnVal - - if Hold == HaafingarHoldLocation - if GetCampForThisFaction == iImperials - ; returnVal = MilitaryCampHaafingarImperialLocation - Else - returnVal = MilitaryCampHaafingarSonsLocation - EndIf - - elseif Hold == ReachHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampReachImperialLocation - Else - returnVal = MilitaryCampReachSonsLocation - endif - - elseif Hold == HjaalmarchHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampHjaalmarchImperialLocation - Else - returnVal = MilitaryCampHjaalmarchSonsLocation - endif - - elseif Hold == WhiterunHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampWhiterunImperialLocation - Else - returnVal = MilitaryCampWhiterunSonsLocation - endif - - elseif Hold == FalkreathHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampFalkreathImperialLocation - Else - returnVal = MilitaryCampFalkreathSonsLocation - endif - - elseif Hold == PaleHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampPaleImperialLocation - Else - returnVal = MilitaryCampPaleSonsLocation - endif - - elseif Hold == WinterholdHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampWinterholdImperialLocation - Else - returnVal = MilitaryCampWinterholdSonsLocation - endif - - elseif Hold == EastmarchHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampEastmarchImperialLocation - Else - ; returnVal = MilitaryCampEastmarchSonsLocation - endif - - elseif Hold == RiftHoldLocation - if GetCampForThisFaction == iImperials - returnVal = MilitaryCampRiftImperialLocation - Else - returnVal = MilitaryCampRiftSonsLocation - endif - - EndIf - - return returnVal - -EndFunction - - -ObjectReference function GetReferenceHQFieldCOForHold(Location Hold, int FactionToCheck) - - log("CWScript", "GetReferenceHQFieldCOForHold(" + Hold + ") calling GetAliasHQFieldCOForHold()") - - ObjectReference returnVar = GetAliasHQFieldCOForHold(Hold, FactionToCheck).GetReference() - - log("CWScript", "GetReferenceHQFieldCOForHold(" + Hold + ") calling GetAliasHQFieldCOForHold() RETURN:" + returnVar) - - return returnVar - -EndFunction - -ObjectReference function GetReferenceCampFieldCOForHold(Location Hold, int FactionToCheck) - - log("CWScript", "GetReferenceCampFieldCOForHold(" + Hold + ") calling GetAliasCampFieldCOForHold()") - - ObjectReference returnVar = GetAliasCampFieldCOForHold(Hold, FactionToCheck).GetReference() - - log("CWScript", "GetReferenceCampFieldCOForHold(" + Hold + ") calling GetAliasCampFieldCOForHold() RETURN:" + returnVar) - - return returnVar - -EndFunction - -referenceAlias function GetAliasHQFieldCOForHold(Location Hold, int FactionToCheck) - - log("CWScript", "GetAliasHQFieldCOForHold(" + Hold + ")") - - ReferenceAlias returnVal - - if FactionToCheck == iImperials - - if Hold == EastmarchHoldLocation - returnVal = Alias_FieldCOImperialEastmarchHQ - elseif Hold == FalkreathHoldLocation - returnVal = Alias_FieldCOImperialFalkreathHQ - elseif Hold == HaafingarHoldLocation - returnVal = Alias_FieldCOImperialHaafingarHQ - elseif Hold == HjaalmarchHoldLocation - returnVal = Alias_FieldCOImperialHjaalmarchHQ - elseif Hold == PaleHoldLocation - returnVal = Alias_FieldCOImperialPaleHQ - elseif Hold == ReachHoldLocation - returnVal = Alias_FieldCOImperialReachHQ - elseif Hold == RiftHoldLocation - returnVal = Alias_FieldCOImperialRiftHQ - elseif Hold == WhiterunHoldLocation - returnVal = Alias_FieldCOImperialWhiterunHQ - elseif Hold == WinterholdHoldLocation - returnVal = Alias_FieldCOImperialWinterholdHQ - - EndIf - - elseif FactionToCheck == iSons - - if Hold == EastmarchHoldLocation - returnVal = Alias_FieldCOSonsEastmarchHQ - elseif Hold == FalkreathHoldLocation - returnVal = Alias_FieldCOSonsFalkreathHQ - elseif Hold == HaafingarHoldLocation - returnVal = Alias_FieldCOSonsHaafingarHQ - elseif Hold == HjaalmarchHoldLocation - returnVal = Alias_FieldCOSonsHjaalmarchHQ - elseif Hold == PaleHoldLocation - returnVal = Alias_FieldCOSonsPaleHQ - elseif Hold == ReachHoldLocation - returnVal = Alias_FieldCOSonsReachHQ - elseif Hold == RiftHoldLocation - returnVal = Alias_FieldCOSonsRiftHQ - elseif Hold == WhiterunHoldLocation - returnVal = Alias_FieldCOSonsWhiterunHQ - elseif Hold == WinterholdHoldLocation - returnVal = Alias_FieldCOSonsWinterholdHQ - - endif - - Else - log("CWScript", " WARNING: GetAliasHQFieldCOForHold(" + Hold + ") expect 1 or 2 for FactionToCheck, intead got: " + FactionToCheck, 2, true, true) - - endif - - log("CWScript", "GetAliasHQFieldCOForHold(" + Hold + ") RETURNING: " + returnVal) - - return returnVal - -EndFunction - -ReferenceAlias Function GetAliasCampFieldCOForHold(Location Hold, int FactionToCheck) - - log("CWScript", "GetAliasCampFieldCOForHold(" + Hold + ")") - - ReferenceAlias returnVal - - if FactionToCheck == iImperials - - if Hold == EastmarchHoldLocation - returnVal = Alias_FieldCOImperialEastmarchCamp - elseif Hold == FalkreathHoldLocation - returnVal = Alias_FieldCOImperialFalkreathCamp - elseif Hold == HaafingarHoldLocation - returnVal = Alias_FieldCOImperialHaafingarCamp - elseif Hold == HjaalmarchHoldLocation - returnVal = Alias_FieldCOImperialHjaalmarchCamp - elseif Hold == PaleHoldLocation - returnVal = Alias_FieldCOImperialPaleCamp - elseif Hold == ReachHoldLocation - returnVal = Alias_FieldCOImperialReachCamp - elseif Hold == RiftHoldLocation - returnVal = Alias_FieldCOImperialRiftCamp - elseif Hold == WhiterunHoldLocation - returnVal = Alias_FieldCOImperialWhiterunCamp - elseif Hold == WinterholdHoldLocation - returnVal = Alias_FieldCOImperialWinterholdCamp - - endif - - Elseif FactionToCheck == iSons - - if Hold == EastmarchHoldLocation - returnVal = Alias_FieldCOSonsEastmarchCamp - elseif Hold == FalkreathHoldLocation - returnVal = Alias_FieldCOSonsFalkreathCamp - elseif Hold == HaafingarHoldLocation - returnVal = Alias_FieldCOSonsHaafingarCamp - elseif Hold == HjaalmarchHoldLocation - returnVal = Alias_FieldCOSonsHjaalmarchCamp - elseif Hold == PaleHoldLocation - returnVal = Alias_FieldCOSonsPaleCamp - elseif Hold == ReachHoldLocation - returnVal = Alias_FieldCOSonsReachCamp - elseif Hold == RiftHoldLocation - returnVal = Alias_FieldCOSonsRiftCamp - elseif Hold == WhiterunHoldLocation - returnVal = Alias_FieldCOSonsWhiterunCamp - elseif Hold == WinterholdHoldLocation - returnVal = Alias_FieldCOSonsWinterholdCamp - - endif - - Else - log("CWScript", " WARNING: GetAliasCampFieldCOForHold(" + Hold + ") expect 1 or 2 for FactionToCheck, intead got: " + FactionToCheck, 2, true, true) - - EndIf - - log("CWScript", "GetAliasCampFieldCOForHold(" + Hold + ") RETURNING: " + returnVal) - - return returnVal - -EndFunction - -int Function GetHoldID(Location HoldToCheck) -{Returns an int specifying the ID of the specified hold; -1 = FAIL} - int holdID = -1 - - if HoldToCheck == HaafingarHoldLocation - holdID = iHaafingar ;1 - elseif HoldToCheck == ReachHoldLocation - holdID = iReach ;2 - elseif HoldToCheck == HjaalmarchHoldLocation - holdID = iHjaalmarch ;3 - elseif HoldToCheck == WhiterunHoldLocation - holdID = iWhiterun ;4 - elseif HoldToCheck == FalkreathHoldLocation - holdID = iFalkreath ;5 - elseif HoldToCheck == PaleHoldLocation - holdID = iPale ;6 - elseif HoldToCheck == WinterholdHoldLocation - holdID = iWinterhold ;7 - elseif HoldToCheck == EastmarchHoldLocation - holdID = iEastmarch ;8 - elseif HoldToCheck == RiftHoldLocation - holdID = iRift ;9 - else - log("CWScript", "GetHoldID(" + HoldToCheck + ") location unrecognized. Expected one of the nine holds, got something else.", 2) - holdID = -1 - - EndIf - - log("CWScript", "GetHoldID() HoldToCheck[" + HoldToCheck + "], ID = " + holdID) - - return holdID -EndFunction - - - -int Function GetHoldOwner(int HoldToCheck) -{Returns an int specifying current owner of HoldToCheck. 1 = Imperials, 2 = Sons, -1 = FAIL} - int owner ;1 = Imperials, 2 = Sons - if HoldToCheck == iHaafingar ;1 - owner = ownerHaafingar - elseif HoldToCheck == iReach ; 2 - owner = ownerReach - elseif HoldToCheck == iHjaalmarch ;3 - owner = ownerHjaalmarch - elseif HoldToCheck == iWhiterun ;4 - owner = ownerWhiterun - elseif HoldToCheck == iFalkreath ;5 - owner = ownerFalkreath - elseif HoldToCheck == iPale ;6 - owner = ownerPale - elseif HoldToCheck == iWinterhold ;7 - owner = ownerWinterhold - elseif HoldToCheck == iEastmarch ;8 - owner = ownerEastmarch - elseif HoldToCheck == iRift ;9 - owner = ownerRift - else - log("CWScript", "GetHoldOwner(" + HoldToCheck + ") parametered unrecognized. Expected an int 1-9 as HoldToCheck, got something else.", 2) - owner = -1 - EndIf - - log("CWScript", "GetHoldOwner() HoldToCheck[" + HoldToCheck + "], owner = " + owner + "[" + FactionName(owner) + "]") - - return owner -EndFunction - -bool function IsPlayerAttacking(Location LocationToCheck) - bool returnVal - - if LocationToCheck.GetKeywordData(CWOwner) == PlayerAllegiance - returnVal = False - - Else - returnVal = True - - EndIf - - log("CWScript", "IsPlayerAttacking(" + LocationToCheck + ") returning: " + returnVal) - - return returnVal - -EndFunction - - -function DiscoverMilitaryCampMarkers(int FactionID) - - if FactionID == iImperials - - ;MilitaryCampEastmarchImperialMapMarker NOT ADDING THIS HERE BECAUSE THIS FUNCTION HAPPENS BEFORE YOU ARE ALLOWED TO GET MISSIONS IN THE FINAL HOLD - MilitaryCampFalkreathImperialMapMarker.addToMap() - MilitaryCampHjaalmarchImperialMapMarker.addToMap() - MilitaryCampPaleImperialMapMarker.addToMap() - MilitaryCampReachImperialMapMarker.addToMap() - MilitaryCampRiftImperialMapMarker.addToMap() - MilitaryCampWhiterunImperialMapMarker.addToMap() - MilitaryCampWinterholdImperialMapMarker.addToMap() - - elseif FactionID == iSons - MilitaryCampFalkreathSonsMapMarker.addToMap() - ;MilitaryCampHaafingarSonsMapMarker NOT ADDING THIS HERE BECAUSE THIS FUNCTION HAPPENS BEFORE YOU ARE ALLOWED TO GET MISSIONS IN THE FINAL HOLD - MilitaryCampHjaalmarchSonsMapMarker.addToMap() - MilitaryCampPaleSonsMapMarker.addToMap() - MilitaryCampReachSonsMapMarker.addToMap() - MilitaryCampRiftSonsMapMarker.addToMap() - MilitaryCampWhiterunSonsMapMarker.addToMap() - MilitaryCampWinterholdSonsMapMarker.addToMap() - - Else - log("CWScript", " WARNING: DiscoverMilitaryCampMarkers(" + FactionID + ") FactionID parameter unrecognized. Expect 1 or 2. Got:" + FactionID, 2, True, True) - - EndIf - - -EndFunction - - -Bool Function FactionOwnsAll(int FactionToTest) -{Returns true if FactionToTest represents a faction that owns all the contestable holds.} - - ;Note the use of \ to break the single if statement across multiple lines for ease of reading - if GetHoldOwner(iReach) == FactionToTest && \ - GetHoldOwner(iHjaalmarch) == FactionToTest && \ - GetHoldOwner(iWhiterun) == FactionToTest && \ - GetHoldOwner(iFalkreath) == FactionToTest && \ - GetHoldOwner(iPale) == FactionToTest && \ - GetHoldOwner(iWinterhold) == FactionToTest && \ - GetHoldOwner(iRift) == FactionToTest - return True - Else - return False - EndIf - -EndFunction - -function RegisterEventHappening(Location LocationWhereEventIsHappening) -{set CWEventHappening keyword data to 1, this can be checked in conditions if designers want things to happen or not happen when civil war events are happening in their location} - - if LocationWhereEventIsHappening.HasKeyword(CWEventHappening) - log("CWScript", " RegisterEventHappening(" + LocationWhereEventIsHappening + ") setting CWEventHappening keyword data to 1.") - LocationWhereEventIsHappening.SetKeywordData(CWEventHappening, 1) - Else - log("CWScript", " WARNING: RegisterEventHappening(" + LocationWhereEventIsHappening + ") does not have CWEventHappening keyword", 2, True, True) - EndIf - -EndFunction - -function UnregisterEventHappening(Location LocationWhereEventIsHappening) -{set CWEventHappening keyword data to 1, this can be checked in conditions if designers want things to happen or not happen when civil war events are happening in their location} - - if LocationWhereEventIsHappening.HasKeyword(CWEventHappening) - log("CWScript", " RegisterEventHappening(" + LocationWhereEventIsHappening + ") setting CWEventHappening keyword data to 0.") - LocationWhereEventIsHappening.SetKeywordData(CWEventHappening, 0) - Else - log("CWScript", " WARNING: RegisterEventHappening(" + LocationWhereEventIsHappening + ") does not have CWEventHappening keyword", 2, True, True) - EndIf - -EndFunction - - -function stopSiegeQuests() - log("CWScript", "CW Script: stopSiegeQuests() NEED TO SHUT DOWN AND CLEAN UP SIEGE QUESTS", 1) - debug.messageBox("CW Script: stopSiegeQuests() NEED TO SHUT DOWN AND CLEAN UP SIEGE QUESTS") -EndFunction - -function StopCivilWar() ;called by CW STAGE 255 -{Used to cut a campaign short so the Civil War can halt for the peace treaty signing scenes} - WarIsActive = -1 - PlayerInvolved = 1 - - ;STOP ANY CIVIL WAR MISSION QUESTS / FORT BATTLES - if CWFortSiegeFort.IsRunning() - CWFortSiegeFort.setStage(9000) - - Rikke.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Rikke.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - - EndIf - - if CWMission03.IsRunning() - CWMission03.setStage(200) - - Rikke.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Rikke.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - EndIf - - if CWMission04.IsRunning() - CWMission04.setStage(200) - - Rikke.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Rikke.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - EndIf - - if CWMission07.IsRunning() - CWMission07.setStage(200) - - Rikke.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOActiveMissionFaction) - Rikke.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - Galmar.GetActorReference().removeFromFaction(CWFieldCOSuccessfulMissionFaction) - EndIf - -; ;If player's side is attacking "FAIL" the CWCampaign, if player's side is defending "COMPLETE" the CWCampaign -; if playerAllegiance == Attacker -; CWCampaignObj.setStage(300) -; Else -; CWCampaignObj.setStage(200) -; EndIf -; -; CWCampaign.stop() -; -; (CWCampaign as CWCampaignScript).ResetCampaign() -; (CWCampaign as CWCampaignPollForMissionAcceptScript).StopPolling() -; setHoldOwner(ContestedHold, ownerContestedHold) - -; CWCampaignTruce.show() - -EndFunction - -function restartCivilWar() ;called in stage 256 of CW quest - SetStage(playerAllegiance) ;sets stage 1 or 2, which calls setplayeAllegience and sets PlayerInvolved to be 1 - - if getStageDone(4) ;makes sure the player has completed a campaign before setting warIsActive (in case you haven't finished the Whiterun battle yet) - WarIsActive = 1 - - Else - WarIsActive = 0 ;in case it was set to -1 due to peace treaty - - endif - -; restartCivilWarCompleteObjectiveIfNeeded(102, HaafingarHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(201, ReachHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(202, ReachHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(301, HjaalmarchHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(302, HjaalmarchHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(401, WhiterunHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(402, WhiterunHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(501, FalkreathHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(502, FalkreathHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(601, PaleHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(602, PaleHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(701, WinterholdHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(702, WinterholdHoldLocation) -; restartCivilWarCompleteObjectiveIfNeeded(801, Eastmarch HoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(901, RiftHoldLocation) - restartCivilWarCompleteObjectiveIfNeeded(902, RiftHoldLocation) - - -EndFunction - -function restartCivilWarCompleteObjectiveIfNeeded(int objectiveToCheck, Location HoldLocationToCheck) - - bool ObjDisplayed = CWObj.IsObjectiveDisplayed(objectiveToCheck) - bool ObjCompleted = CWObj.IsObjectiveCompleted(objectiveToCheck) - bool HoldOwnedByPlayersFaction = HoldLocationToCheck.GetKeywordData(CWOwner) == playerAllegiance - - bool ShouldCompleteObj = False - - if ObjDisplayed && ObjCompleted == False - if HoldOwnedByPlayersFaction - ShouldCompleteObj = true - EndIf - EndIf - - log("CWScript", " restartCivilWarCompleteObjectiveIfNeeded() COMPLETE OBJECTIVE? " + ShouldCompleteObj + "; Details: Objective: " + objectiveToCheck + ", Location: " + HoldLocationToCheck + " Objective Displayed?: " + ObjDisplayed + ", Objective Completed?: " + ObjCompleted + ", Location Owned by Player's faction?: " + HoldOwnedByPlayersFaction) - - if ShouldCompleteObj - CWObj.SetObjectiveCompleted(objectiveToCheck) - EndIf - -EndFunction - - - -Function SetCountWins() -{Sets various count variables for keeping track of how many times each faction won each hold... calls SetCountWinsImperials() and SetCountWinsSons()} - - if ContestedHoldWinner == iImperials - SetCountWinsImperials() - Elseif contestedHoldWinner == iSons - SetCountWinsSons() - EndIf -EndFunction - - -Function SetCountWinsImperials() - CountWinImperials += 1 - - if ContestedHold == iReach ;2 - CountWinReachImperials += 1 - - elseif ContestedHold == iHjaalmarch ;3 - CountWinHjaalmarchImperials += 1 - - elseif ContestedHold == iWhiterun ;4 - CountWinWhiterunImperials += 1 - - elseif ContestedHold == iFalkreath ;5 - CountWinFalkreathImperials += 1 - - elseif ContestedHold == iPale ;6 - CountWinPaleImperials += 1 - - elseif ContestedHold == iWinterhold ;7 - CountWinWinterholdImperials += 1 - - elseif ContestedHold == iRift ;9 - CountWinRiftImperials += 1 - - EndIf -EndFunction - -Function SetCountWinsSons() - CountWinSons += 1 - - if ContestedHold == iReach ;2 - CountWinReachSons += 1 - - elseif ContestedHold == iHjaalmarch ;3 - CountWinHjaalmarchSons += 1 - - elseif ContestedHold == iWhiterun ;4 - CountWinWhiterunSons += 1 - - elseif ContestedHold == iFalkreath ;5 - CountWinFalkreathSons += 1 - - elseif ContestedHold == iPale ;6 - CountWinPaleSons += 1 - - elseif ContestedHold == iWinterhold ;7 - CountWinWinterholdSons += 1 - - elseif ContestedHold == iRift ;9 - CountWinRiftSons += 1 - - EndIf -EndFunction - - - -Message Function getCampaignWonMessage() -{Returns the message object associated with the corresponding contestedHold and contestedHoldWinner property} - - Message messageToReturn - - if PlayerAllegiance == iImperials - if contestedHoldWinner == iImperials - if contestedHoldWinType == 1 ;took away - messageToReturn = CWCampaignOutcomeWonAttackMsgImperial - elseif contestedHoldWinType == 2 ;held onto - messageToReturn = CWCampaignOutcomeWonDefenseMsgImperial - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for contestedHoldWinType, found: " + contestedHoldWinType, 2) - EndIf - - elseif contestedHoldWinner == iSons - if contestedHoldWinType == 1 ; Sons took away - messageToReturn = CWCampaignOutcomeLostDefenseMsgImperial - elseif contestedHoldWinType == 2 ;Sons held onto - messageToReturn = CWCampaignOutcomeLostAttackMsgImperial - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for contestedHoldWinType, found: " + contestedHoldWinType, 2) - EndIf - - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for contestedHoldWinner, found: " + contestedHoldWinType, 2) - - EndIf - - elseif PlayerAllegiance == iSons - if contestedHoldWinner == iSons - if contestedHoldWinType == 1 ;took away - messageToReturn = CWCampaignOutcomeWonAttackMsgSons - elseif contestedHoldWinType == 2 ;held onto - messageToReturn = CWCampaignOutcomeWonDefenseMsgSons - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for contestedHoldWinType, found: " + contestedHoldWinType, 2) - EndIf - - elseif contestedHoldWinner == iImperials - if contestedHoldWinType == 1 ; Imperials took away - messageToReturn = CWCampaignOutcomeLostDefenseMsgSons - elseif contestedHoldWinType == 2 ;Imperials held onto - messageToReturn = CWCampaignOutcomeLostAttackMsgSons - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for contestedHoldWinType, found: " + contestedHoldWinType, 2) - EndIf - - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for contestedHoldWinner, found: " + contestedHoldWinner, 2) - - EndIf - - Else - Log("CWScript", " WARNING: getCampaignWonMessage() expected 1 or 2 for PlayerAllegiance, found: " + PlayerAllegiance, 2) - - EndIf - - - Log("CWScript", "getCampaignWonMessage() returning: " + messageToReturn) - - return messageToReturn - - -; If contestedHold == iReach -; If contestedHoldWinner == iImperials -; return CWCampaignWonReachImperials -; Else ;== iSons -; return CWCampaignWonReachSons -; EndIf -; -; ElseIf contestedHold == iHjaalmarch -; If contestedHoldWinner == iImperials -; return CWCampaignWonHjaalmarchImperials -; Else ;== iSons -; return CWCampaignWonHjaalmarchSons -; EndIf -; -; ElseIf contestedHold == iWhiterun -; If contestedHoldWinner == iImperials -; return CWCampaignWonWhiterunImperials -; Else ;== iSons -; return CWCampaignWonWhiterunSons -; EndIf -; -; ElseIf contestedHold == iFalkreath -; If contestedHoldWinner == iImperials -; return CWCampaignWonFalkreathImperials -; Else ;== iSons -; return CWCampaignWonFalkreathSons -; EndIf -; -; ElseIf contestedHold == iPale -; If contestedHoldWinner == iImperials -; return CWCampaignWonPaleImperials -; Else ;== iSons -; return CWCampaignWonPaleSons -; EndIf -; -; ElseIf contestedHold == iWinterhold -; If contestedHoldWinner == iImperials -; return CWCampaignWonWinterholdImperials -; Else ;== iSons -; return CWCampaignWonWinterholdSons -; EndIf -; -; ElseIf contestedHold == iRift -; If contestedHoldWinner == iImperials -; return CWCampaignWonRiftImperials -; Else ;== iSons -; return CWCampaignWonRiftSons -; EndIf -; -; EndIf - -EndFunction - - -location Function getLocationForHold(int Hold) -{Returns a location corresponding to the integer Hold parameter} - - if Hold == iHaafingar ;1 - return HaafingarHoldLocation - - elseif Hold == iReach ;2 - return ReachHoldLocation - - elseif Hold == iHjaalmarch ;3 - return HjaalmarchHoldLocation - - elseif Hold == iWhiterun ;4 - return WhiterunHoldLocation - - elseif Hold == iFalkreath ;5 - return FalkreathHoldLocation - - elseif Hold == iPale ;6 - return PaleHoldLocation - - elseif Hold == iWinterhold ;7 - return WinterholdHoldLocation - - elseif Hold == iEastmarch ;8 - return EastmarchHoldLocation - - elseif Hold == iRift ;9 - return RiftHoldLocation - - EndIf - -EndFunction - -int function getIntForHoldLocation(Location LocationToGetIntFor) - - if LocationToGetIntFor == None - log("CWScript", " WARNING! getIntForHoldLocation() returning -1 because it recieved an unexpected location that isn't a hold: " + LocationToGetIntFor) - return -1 - EndIf - - - if LocationToGetIntFor == HaafingarHoldLocation - return iHaafingar - - ElseIf LocationToGetIntFor == ReachHoldLocation - return iReach - - ElseIf LocationToGetIntFor == HjaalmarchHoldLocation - return iHjaalmarch - - ElseIf LocationToGetIntFor == WhiterunHoldLocation - return iWhiterun - - ElseIf LocationToGetIntFor == FalkreathHoldLocation - return iFalkreath - - ElseIf LocationToGetIntFor == PaleHoldLocation - return iPale - - ElseIf LocationToGetIntFor == WinterholdHoldLocation - return iWinterhold - - ElseIf LocationToGetIntFor == EastmarchHoldLocation - return iEastmarch - - ElseIf LocationToGetIntFor == RiftHoldLocation - return iRift - - Else - log("CWScript", " WARNING! getIntForHoldLocation() returning -1 because it recieved an unexpected location that isn't a hold: " + LocationToGetIntFor) - return -1 - EndIf - -EndFunction - - -ObjectReference Function getCampaignStartMarker(int Hold) -{Returns an objectReference (xmarker) corresponding to the integer Hold parameter} - - if Hold == iHaafingar ;1 - return CWCampaignStartMarkerHaafingar - - elseif Hold == iReach ;2 - return CWCampaignStartMarkerReach - - elseif Hold == iHjaalmarch ;3 - return CWCampaignStartMarkerHjaalmarch - - elseif Hold == iWhiterun ;4 - return CWCampaignStartMarkerWhiterun - - elseif Hold == iFalkreath ;5 - return CWCampaignStartMarkerFalkreath - - elseif Hold == iPale ;6 - return CWCampaignStartMarkerPale - - elseif Hold == iWinterhold ;7 - return CWCampaignStartMarkerWinterhold - - elseif Hold == iEastmarch ;8 - return CWCampaignStartMarkerEastmarch - - elseif Hold == iRift ;9 - return CWCampaignStartMarkerRift - - EndIf - -EndFunction - - -function initializeFortOwnerKeywordData() - ;The main quest needs to find CWCampaignStartMarkers based on who owns the hold. The CWCampaignMarker objects live in all the forts, therefore I need to set the keyword data for these at game start so without question the Main Quest knows who owns what via keyword data - - FortHraggstadLocation.SetKeywordData(CWOwner, iImperials) - FortSungardLocation.SetKeywordData(CWOwner, iImperials) - FortSnowhawkLocation.SetKeywordData(CWOwner, iImperials) - FortGreymoorLocation.SetKeywordData(CWOwner, iImperials) - FortNeugradLocation.SetKeywordData(CWOwner, iImperials) - - FortDunstadLocation.SetKeywordData(CWOwner, iSons) - FortKastavLocation.SetKeywordData(CWOwner, iSons) - FortAmolLocation.SetKeywordData(CWOwner, iSons) - FortGreenwallLocation.SetKeywordData(CWOwner, iSons) - -EndFunction - -int function getOwner(Location LocationToCheck) -{Returns an int representing the faction that controls the location. Checked the CWOwner keyword data on the location. 1 = Imperials, 2 = Sons} - - int owner = LocationToCheck.GetKeywordData(CWOwner) as Int - - Log("CWScript", "GetOwner(" + LocationToCheck + ") returning " + owner + "(" + FactionName(owner) + ")") - - return owner - -EndFunction - -int Function GetAttacker(Location LocationToCheck) -{Returns and int representing the faction that does not control the location} - - int returnVal - - if GetOwner(LocationToCheck) == iImperials - returnVal = iSons - - Elseif GetOwner(LocationToCheck) == iSons - returnVal = iImperials - - Else - - Log("CWScript", " WARNING: GetAttacker(" + LocationToCheck + ") found unexpected Owner. Expected 1 or 2, instead got " + returnVal, 2, true, true) - - EndIf - - Log("CWScript", "GetAttacker(" + LocationToCheck + ") returning: " + returnVal) - - return returnVal - -EndFunction - -int Function GetDefender(Location LocationToCheck) -{Returns and int representing the faction that does not control the location} - - int returnVal = GetOwner(LocationToCheck) - - Log("CWScript", "GetDefender(" + LocationToCheck + ") returning: " + returnVal) - - return returnVal - -EndFunction - - -bool function PlayersFactionIsAttacker(Location LocationToCheck) - bool returnVal - - returnVal = GetAttacker(LocationToCheck) == PlayerAllegiance - - Log("CWScript", "PlayersFactionIsAttacker(" + LocationToCheck + ") returning: " + returnVal) - - return returnVal - -EndFunction - -bool function PlayersFactionIsDefender(Location LocationToCheck) - bool returnVal - - returnVal = GetDefender(LocationToCheck) == PlayerAllegiance - - Log("CWScript", "PlayersFactionIsDefender(" + LocationToCheck + ") returning: " + returnVal) - - return returnVal - -EndFunction - -bool function ImperialsAreAttacking(Location LocationToCheck) - Log("CWScript", "ImperialsAreAttacking()") - bool returnVal - - returnVal = GetAttacker(LocationToCheck) == iImperials - - Log("CWScript", "ImperialsAreAttacking() returning: " + returnVal) - - return returnVal - -EndFunction - -bool function SonsAreAttacking(Location LocationToCheck) - Log("CWScript", "SonsAreAttacking()") - bool returnVal - - returnVal = GetAttacker(LocationToCheck) == iSons - - Log("CWScript", "SonsAreAttacking() returning: " + returnVal) - - return returnVal - -EndFunction - -bool function IsActorAttacker(actor actorToCheck, Location locationOfBattle) -{Returns true if the actor is in the CWImperial/SonsFaction and that faction is currently the Attacker} - - bool returnVal = GetAttacker(locationOfBattle) == GetActorAllgeiance(actorToCheck) - - Log("CWScript", "IsActorAttacker(" + actorToCheck + ", " + locationOfBattle + ") returning: " + returnVal) - - return returnVal - -EndFunction - -bool function IsActorDefender(actor actorToCheck, Location locationOfBattle) -{Returns true if the actor is in the CWImperial/SonsFaction and that faction is currently the Defender} - return GetDefender(locationOfBattle) == GetActorAllgeiance(actorToCheck) - -EndFunction - - -int function GetWinner(Location LocationOfFinaleBattle, bool AttackerWon = false, bool DefenderWon = False) - Log("CWScript", "GetWinner() LocationOfFinalBattle: " + LocationOfFinaleBattle + " AttackerWon: " + AttackerWon + ", DefenderWon:" + DefenderWon ) - - int returnVar - - if AttackerWon - returnVar = GetAttacker(LocationOfFinaleBattle) - - elseif DefenderWon - returnVar = GetDefender(LocationOfFinaleBattle) - - Else - Log("CWScript", " WARNING: GetWinner() called with NEITHER AtackerWon nor DefenderWon parameters being true!", 2, true, true ) - returnVar = -1 - EndIf - - Log("CWScript", "GetWinner() returning " + returnVar) - - return returnVar - -EndFunction - - -;CALLED BY CWMissionScript -;Note: this should only be called for registering settlments and towns, not capitals -;it's used by main quest negotiations, flavored as "a massacre" with some question as to what happened. Everyone knows what happened at capital battles. -Function RegisterLocationAttacked(Location HoldLocation, location AttackedLocation, int iFaction = 0) -{Called by any mission where a settlement is attacked violently in such a way that people *could* condemn the action. Default iFaction doing the attacking is the CW.Attacker} - if iFaction == 0 - iFaction = GetAttacker(HoldLocation) - EndIf - - if iFaction == iImperials - Log("CWScript", "RegisterLocationAttacked() setting LastLocAttackedByImperials to " + AttackedLocation) - LastLocAttackedByImperials = AttackedLocation - - elseif iFaction == iSons - Log("CWScript", "RegisterLocationAttacked() setting LastLocAttackedBySons to " + AttackedLocation) - LastLocAttackedBySons = AttackedLocation - Else - Log("CWScript", " WARNING: RegisterLocationAttack expected GetAttacker(HoldLocation) to be 1 or 2.", 2, true, true) - EndIf - - LastLocAttacked = AttackedLocation - - Log("CWMissionScript", self + "RegisterLocationAttacked() setting LastLocAttacked to " + AttackedLocation) - -EndFunction - -function RemoveGarrisonFromWar(Location LocationToTurnOff) - Log("CWMissionScript", self + "RemoveGarrisonFromWar(" + LocationToTurnOff + "), REMEMBER TO DISABLE THE ENABLE MARKERS YOURSELF") - - ;-2 because GetKeyWordData() returns -1 if the keyword isn't present - - If LocationToTurnOff.HasKeyword(CWGarrison) - Log("CWMissionScript", self + "RemoveGarrisonFromWar() setting CWGarrison to -2 for location: " + LocationToTurnOff + " REMEMBER TO DISABLE THE ENABLE MARKERS YOURSELF") - LocationToTurnOff.SetKeywordData(CWGarrison, -2) ;NOTE!!! This ONLY works for things with the CWGarrison keyword, which are settlements and towns, etc. that aren't CWGarrisonDefenderOnly, or Camps, or Forts. - - elseif LocationToTurnOff.HasKeyword(CWFort) - Log("CWMissionScript", self + "RemoveGarrisonFromWar() setting CWFort to -2 for location: " + LocationToTurnOff + " REMEMBER TO DISABLE THE ENABLE MARKERS YOURSELF") - LocationToTurnOff.SetKeywordData(CWFort, -2) ;NOTE!!! This ONLY works for things with the CWFort keyword - - Else - Log("CWMissionScript", self + " WARNING: RemoveGarrisonFromWar() found NEITHER CWGarrison NOR CWFort keyword for location : " + LocationToTurnOff + " THIS WILL CAUSE UNEXPECTED BEHAVIOR", 2, true, true) - - EndIf - - -EndFunction - -function AddGarrisonBackToWar(Location LocationToTurnOn, int FactionToOwn = 0, bool SkipSetOwnerCall = False) - Log("CWMissionScript", self + "AddGarrisonBackToWar(" + LocationToTurnOn + ") and will call setOwner() so it will get turned on.") - - If LocationToTurnOn.HasKeyword(CWGarrison) - Log("CWMissionScript", self + "AddGarrisonBackToWar() setting CWGarrison to 0 for location: " + LocationToTurnOn + " and will call setOwner() so it will get turned on.") - LocationToTurnOn.SetKeywordData(CWGarrison, 0) - - elseif LocationToTurnOn.HasKeyword(CWFort) - Log("CWMissionScript", self + "AddGarrisonBackToWar() setting CWFort to 0 for location: " + LocationToTurnOn + " and will call setOwner() so it will get turned on") - LocationToTurnOn.SetKeywordData(CWFort, 0) - - Else - Log("CWMissionScript", self + " WARNING: AddGarrisonBackToWar() found NEITHER CWGarrison NOR CWFort keyword for location : " + LocationToTurnOn + " THIS WILL CAUSE UNEXPECTED BEHAVIOR", 2, true, true) - - EndIf - - if FactionToOwn == 0 ;if it's not explicitly passed in, use the current owner - - FactionToOwn = LocationToTurnOn.GetKeywordData(CWOwner) as Int - - Log("CWMissionScript", self + "AddGarrisonBackToWar() setting FactionToOwn to current owner:" + FactionToOwn) - - endif - - if SkipSetOwnerCall == False - setOwner(LocationToTurnOn, FactionToOwn) - EndIf - -EndFunction - -function AddEnemyFortsToBackToWar(bool ShowDebugMessage = False) - Log("CWMissionScript", self + "AddEnemyFortsToBackToWar()") - - if ShowDebugMessage == True - debug.MessageBox("Setting Enemy Forts to be cleared of bandits and ready for missions. WAIT before testing civil war missions.") - - EndIf - - if EnemyFortsAddedBackToWar == True - Log("CWMissionScript", self + "AddEnemyFortsToBackToWar() EnemyFortsAddedBackToWar == true, so skipping bailing out from adding forts back to war ") - return - EndIf - - if PlayerAllegiance == iImperials - Log("CWMissionScript", self + "AddEnemyFortsToBackToWar() player is Imperial, adding Stormcloak forts (not Fort Greymoor regardless) back to the war by calling AddGarrisonBackToWar.") - - ;AddGarrisonBackToWar(FortGreymoorLocation) - leaving this alone since I'm assuming the majority of players will own the hold, we want them to fight bandits here - - AddGarrisonBackToWar(FortKastavLocation) - AddGarrisonBackToWar(FortDunstadLocation) - AddGarrisonBackToWar(FortAmolLocation) - AddGarrisonBackToWar(FortGreenWallLocation) - - EnemyFortsAddedBackToWar = True - - elseif PlayerAllegiance == iSons - Log("CWMissionScript", self + "AddEnemyFortsToBackToWar() player is Sons, adding Imperial forts (not Fort Greymoor regardless) back to the war by calling AddGarrisonBackToWar().") - - ;AddGarrisonBackToWar(FortGreymoorLocation) - leaving this alone since I'm assuming the majority of players will own the hold, we want them to fight bandits here - - AddGarrisonBackToWar(FortNeugradLocation) - AddGarrisonBackToWar(FortHraggstadLocation) - AddGarrisonBackToWar(FortSungardLocation) - AddGarrisonBackToWar(FortSnowhawkLocation) - - - EnemyFortsAddedBackToWar = True - - Else - Log("CWMissionScript", self + " WARNING: AddEnemyFortsToBackToWar() expected PlayerAllegiance to be 1 or 2, instead got" + PlayerAllegiance, 2, true, true) - - EndIf - - if ShowDebugMessage == True - debug.MessageBox("Done Setting Enemy Forts to be cleared of bandits and ready for missions. You may now test civil war missions.") - - EndIf - - Log("CWMissionScript", self + "AddEnemyFortsToBackToWar() FINSIHED") - -EndFunction - -function SetOwnerKeywordDataOnly(Location LocationToSet, int FactionToOwn) -{used by SetOwner() function... probably not a good idea to call on it's own, unless you know you will soon be following up with a setowner call} - if LocationToSet - LocationToSet.SetKeywordData(CWOwner, FactionToOwn) - EndIf - -EndFunction - -Function setOwner(Location LocationToSet1, int FactionToOwn, Location LocationToSet2 = None, Location LocationToSet3 = None, Location LocationToSet4 = None, \ - Location LocationToSet5 = None, Location LocationToSet6 = None , Location LocationToSet7 = None , Location LocationToSet8 = None, \ - bool SetKeywordDataImmediately = False) -{Sets the CWOwner keyword on LocationToSet based on the FactionToOwn (takes 1,2, or 3, it sets the keyword data to -1, -2, -3 for Imperials, Sons, both factions (ie patrols) respectively). Note: If Faction to Own == -999 it means don't change the keyword, just reset the location - used to reset the guards without changing ownership} - - int SecondsSpentWaiting ;how many seconds spent waiting for callback from CWResetGarrisonQuest - int MaxSecondsToWaitBeforeBailingOut = 600 ;wait 10 minutes for call back from CWResetGarrisonQuest, then give up - - if debugSkipSetOwnerCalls - log("CWScript", "setOnwer() debugSkipSetOwnerCalls is turned on, so we are skipping calls to set owner. This will break things, but is convenient to start campaign faster for certain types of playtesting.", 1) - return - EndIf - - if setKeywordDataImmediately - SetOwnerKeywordDataOnly(LocationToSet1, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet2, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet3, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet4, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet5, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet6, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet7, FactionToOwn) - SetOwnerKeywordDataOnly(LocationToSet8, FactionToOwn) - EndIf - - ;trap any threads that have come in while we are already dealing with previous request(s) - while WaitingForCWResetGarrisonQuest1 || WaitingForCWResetGarrisonQuest2 || WaitingForCWResetGarrisonQuest3 || WaitingForCWResetGarrisonQuest4 - log("CWScript", "setOwner() Wants to process new locations, but we are already processing another request and are still waiting for CWResetGarrison quests to call back.") - Utility.wait(5) - EndWhile - - log("CWScript", "setOwner(), setting WaitingForCWResetGarrisonQuest1/2/3/4/5/6/7/8 to True") - WaitingForCWResetGarrisonQuest1 = true - WaitingForCWResetGarrisonQuest2 = true - WaitingForCWResetGarrisonQuest3 = true - WaitingForCWResetGarrisonQuest4 = true - WaitingForCWResetGarrisonQuest5 = true - WaitingForCWResetGarrisonQuest6 = true - WaitingForCWResetGarrisonQuest7 = true - WaitingForCWResetGarrisonQuest8 = true - - ;The IMPORTANT thing about this function, is that it does NOT return until after all the ResetGarrison quests are all finished running - - ;Start ResetGarrisonX quests (returns false if not starting quest because LocationToSetX is empty) - - ;the reason wrap this in a test if an if statement, is because it is possible that the quest sets the WaitingForCWResetGarrisonX property to false in it's shut down phase before this function returns and we don't want to overwrite that with true returned by this function) - if !setOwnerStartResetQuest(LocationToSet1, FactionToOwn, CWResetGarrisonStart1) - WaitingForCWResetGarrisonQuest1 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet2, FactionToOwn, CWResetGarrisonStart2) - WaitingForCWResetGarrisonQuest2 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet3, FactionToOwn, CWResetGarrisonStart3) - WaitingForCWResetGarrisonQuest3 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet4, FactionToOwn, CWResetGarrisonStart4) - WaitingForCWResetGarrisonQuest4 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet5, FactionToOwn, CWResetGarrisonStart5) - WaitingForCWResetGarrisonQuest5 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet6, FactionToOwn, CWResetGarrisonStart6) - WaitingForCWResetGarrisonQuest6 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet7, FactionToOwn, CWResetGarrisonStart7) - WaitingForCWResetGarrisonQuest7 = false - EndIf - - if !setOwnerStartResetQuest(LocationToSet8, FactionToOwn, CWResetGarrisonStart8) - WaitingForCWResetGarrisonQuest8 = false - EndIf - - - While WaitingForCWResetGarrisonQuest1 || WaitingForCWResetGarrisonQuest2 || WaitingForCWResetGarrisonQuest3 || WaitingForCWResetGarrisonQuest4 || \ - WaitingForCWResetGarrisonQuest5 || WaitingForCWResetGarrisonQuest6 || WaitingForCWResetGarrisonQuest7 || WaitingForCWResetGarrisonQuest8 || \ - CWResetGarrison1.IsStopped() == False || CWResetGarrison2.IsStopped() == False || CWResetGarrison3.IsStopped() == False || CWResetGarrison4.IsStopped() == False || \ - CWResetGarrison5.IsStopped() == False || CWResetGarrison6.IsStopped() == False || CWResetGarrison7.IsStopped() == False || CWResetGarrison8.IsStopped() == False - - if SecondsSpentWaiting >= MaxSecondsToWaitBeforeBailingOut - log("CWScript", "setOwner(): ERROR!!! Have been waiting for call backs from CWResetGarrison1/2/3/4/5/6/7/8 quests for " + SecondsSpentWaiting + " seconds. Giving up." , 2) - return - - Else - log("CWScript", "setOwner() waiting for CWResetGarrison1/2/3/4/5/6/7/8 quests to call back. Have been waiting for " + SecondsSpentWaiting + " seconds.") - -; ; debug.trace(WaitingForCWResetGarrisonQuest1 + " " + \ -; WaitingForCWResetGarrisonQuest2 + " " + \ -; WaitingForCWResetGarrisonQuest3 + " " + \ -; WaitingForCWResetGarrisonQuest4 + " " + \ -; WaitingForCWResetGarrisonQuest5 + " " + \ -; WaitingForCWResetGarrisonQuest6 + " " + \ -; WaitingForCWResetGarrisonQuest7 + " " + \ -; WaitingForCWResetGarrisonQuest8 + " " + \ -; CWResetGarrison1.IsStopped() + " " + \ -; CWResetGarrison2.IsStopped() + " " + \ -; CWResetGarrison3.IsStopped() + " " + \ -; CWResetGarrison4.IsStopped() + " " + \ -; CWResetGarrison5.IsStopped() + " " + \ -; CWResetGarrison6.IsStopped() + " " + \ -; CWResetGarrison7.IsStopped() + " " + \ -; CWResetGarrison8.IsStopped() + " " ) - - SecondsSpentWaiting += 5 - Utility.Wait(5) - - EndIf - EndWhile - - log("CWScript", "setOwner() is finsihed") - -EndFunction - -bool function setOwnerStartResetQuest(Location LocationToSet, int FactionToOwn, Keyword KeywordForResetGarrisonQuest) -{Sub function of setOwner()} - - log("CWScript", "setOwnerStartResetQuest() called with: LocationToSet: " + LocationToSet + ", FactionToOwn: " + FactionToOwn + ", KeywordForResetGarrisonQuest: " + KeywordForResetGarrisonQuest) - - if locationToSet - if FactionToOwn != iCurrentOwner - ;LocationToSet.SetKeyWordData(CWOwner, -(FactionToOwn)) NO LONGER SETTING IT TO NEGAITVE... i was using -1 for obsolete reasons... it's now possible to cause problems because my quest conditions for missions often are CWOwnner != PlayerAllegience (which -1 and -2 will always return true for, so it's possible to get a mission for some place that would be in the middle of switching over) - LocationToSet.SetKeyWordData(CWOwner, FactionToOwn) - log("CWScript", "setOwnerStartResetQuest() setting owner to " + FactionToOwn +"(" + FactionName(FactionToOwn) + ") for " + LocationToSet) - Else - log("CWScript", "setOwnerStartResetQuest() not changing owner, just resetting the garrison for whoever currently owns it.") - EndIf - -; While Game.GetPlayer().IsInLocation(LocationToSet) ;do nothing until the player isn't in same location as the LocToReset -; ;DO NOTHING -; log("CWScript", "setOwnerStartResetQuest() waiting until player is no longer in location:" + LocationToSet) -; utility.wait(1) ;wait a second before checking if if player is in location again -; EndWhile -;THE ABOVE WAY IS NOT AS GOOD BECAUSE IT COULD CAUSE THINGS TO POP IF YOU TECHNICALLY ARE NOT IN THE LOCATION BUT YOU CAN STILL "SEE INTO" IT -- commenting it out rather than deleting for now - - While LocationToSet.IsLoaded() ;do nothing until the player isn't in same area as the LocToReset - ;DO NOTHING - log("CWScript", "setOwnerStartResetQuest() waiting until location is no longer loaded (ie out of the 5x5):" + LocationToSet) - utility.wait(1) ;wait a second before checking if if player is in location again - EndWhile - - log("CWScript", "setOwnerStartResetQuest() starting reset garrison quest, CWResetGarrissonX.SendStoryEvent(" + LocationToSet + ")") - KeywordForResetGarrisonQuest.SendStoryEvent(LocationToSet) - - Else - return False ;we aren't starting a quest - EndIf - - log("CWScript", "setOwnerStartResetQuest() finished.") - - return True ;we are starting a quest -- NOTE don't do anything with this return value because it's POSSIBLE that the quest's shut down phase happens (setting the property in quest to false) before this returns true. We don't want to overwrite it: see note SetOwner() where this function is called) - - - -EndFunction - - - -function WinHoldOffScreenIfNotDoingCapitalBattles(Location HoldToWin, bool AttackersHaveWon = true, bool DefendersHaveWon = False) -;CALLED BY STAGE 9000 IN THE CWFortSiegeCaptial/Fort Quests for regular Fort Battles -;AND STAGE 200 in CWMission04 Quest - Rescue Prisoners from fort and take over -;REPLICATE WHAT USED TO HAPPEN AFTER BATTLES FOR CAPITAL CITIES AND MINOR HOLDS - - log("CWScript", "WinHoldOffScreen(HoldToWin:" + HoldToWin + ", AttackersHaveWon:" + AttackersHaveWon + ", DefendersHaveWon:" + DefendersHaveWon + ")") - - ;IF WE LATER DECIDE TO REIMPLEMENT THE ATTACKS ON THE CAPITALS - ;THE LOGIC FOR WHICH WE WILL DO CAN GO HERE - - WinHoldAndSetOwnerKeywordDataOnly(HoldToWin, AttackersHaveWon, DefendersHaveWon) - - CompleteCWObj(HoldToWin) - - ;if the peace treaty quest is running, shut it down, as it's now too late to have a peace treaty - if HoldToWin == HjaalmarchHoldLocation || HoldToWin == WinterholdHoldLocation - - bool MQ302Running = MQ302.isRunning() - int MQ302Stage = MQ302.getstage() - - log("CWScript", "WinHoldOffScreen(HoldToWin:" + HoldToWin + ") MQ302 is running? [" + MQ302Running + "], MQ302 stage: " + MQ302Stage) - - if MQ302Running && MQ302Stage < 40 - log("CWScript", "WinHoldOffScreen(HoldToWin:" + HoldToWin + ") MQ302 is running and < stage 40, so calling it's stage 350 to shut it down.") - MQ302.setStage(350) - EndIf - - EndIf - - ;GIVE OWNERSHIP - WAITS to return until player isn't in various locations in the hold - WinHoldAndSetOwner(HoldToWin, AttackersHaveWon, DefendersHaveWon) - -EndFunction - - -function WinHoldAndSetOwnerKeywordDataOnly(Location HoldLocationToSet, bool AttackersWon, bool DefendersWon) -{Call the moment one side has won a siege so faction leader has appropriate dialogue } - - WinningHoldAndSettingOwnerPleaseWait = True - - log("CWScript", "WinHoldAndSetOwnerKeywordDataOnly() HoldLocationToSet:" + HoldLocationToSet + ", AttackersWon: " + AttackersWon + ", DefendersWon: " + DefendersWon) - - int winner = GetWinner(HoldLocationToSet, AttackersWon, DefendersWon) - - SetOwnerKeywordDataOnly(HoldLocationToSet, winner) - WinHoldAndSetOwnerAlreadySetKeyword = True - - log("CWScript", "WinHoldAndSetOwnerKeywordDataOnly() Will call ClearHoldCrimeGold(" + HoldLocationToSet + ")") - ClearHoldCrimeGold(HoldLocationToSet) - - WinningHoldAndSettingOwnerPleaseWait = False - -EndFunction - -function WinHoldAndSetOwner(Location HoldLocationToSet, bool AttackersWon, bool DefendersWon) -{Call at the end of a siege in shutdown stage} - - int waitingFor - - while WinningHoldAndSettingOwnerPleaseWait - utility.wait(1) - WaitingFor += 1 - log("CWScript", "WinHoldAndSetOwner(): WinningHoldAndSettingOwnerPleaseWait == true, meaning WinHoldAndSetOwnerKeywordOnly is currently processing... waiting for:" + waitingFor) - EndWhile - - log("CWScript", "WinHoldAndSetOwner() HoldLocationToSet:" + HoldLocationToSet + ", AttackersWon: " + AttackersWon + ", DefendersWon: " + DefendersWon) - - int NewOwner - - if WinHoldAndSetOwnerAlreadySetKeyword == False - log("CWScript", "WinHoldAndSetOwner() sees WinHoldAndSetOwnerAlreadySetKeyword == false, so we will determine the new owner with GetWinner()") - NewOwner = GetWinner(HoldLocationToSet, AttackersWon, DefendersWon) - Else - log("CWScript", "WinHoldAndSetOwner() sees WinHoldAndSetOwnerAlreadySetKeyword == true, so we will determine the new owner with GetKeywordData()") - NewOwner = HoldLocationToSet.GetKeywordData(CWOwner) as Int - WinHoldAndSetOwnerAlreadySetKeyword = False - EndIf - - log("CWScript", "WinHoldAndSetOwner() Will call ClearHoldCrimeGold(" + HoldLocationToSet + ")") - ClearHoldCrimeGold(HoldLocationToSet) - - log("CWScript", "WinHoldAndSetOwner() Will call SetHoldOwner() for faction:" + NewOwner) - SetHoldOwner(HoldLocationToSet, NewOwner) - -EndFunction - - -function SetHoldOwner(Location HoldLocationToSet, int factionToOwn) - log("CWScript", "SetHoldOwner(" + HoldLocationToSet + ", " + factionToOwn + ") calling SetOwner()") - - SetOwnerKeywordDataOnly(HoldLocationToSet, factionToOwn) - - SetHoldOwnerByInt(GetHoldID(HoldLocationToSet), factionToOwn) - -EndFunction - -;OLD VERSION - used by MQ -Function SetHoldOwnerByInt(int HoldToSet, int FactionToOwn, bool DiplomaticVictory = false ) -{Takes int HoldToSet and int FactionToOwn, and calls the appropriate setOwnerXXX(FactionToOwn) function - DiplomaticVictory is for if hold was won through MQ302, and sets keyword data which is used for conditions in dialogue with faction leader} - - if HoldToSet == iHaafingar ;1 - AddGarrisonBackToWar(FortHraggstadLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerHaafingar(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iReach ; 2 - AddGarrisonBackToWar(FortSungardLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerReach(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iHjaalmarch ;3 - AddGarrisonBackToWar(FortSnowhawkLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerHjaalmarch(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iWhiterun ;4 - AddGarrisonBackToWar(FortGreymoorLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerWhiterun(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iFalkreath ;5 - AddGarrisonBackToWar(FortNeugradLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerFalkreath(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iPale ;6 - AddGarrisonBackToWar(FortDunstadLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerPale(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iWinterhold ;7 - AddGarrisonBackToWar(FortKastavLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerWinterhold(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iEastmarch ;8 - AddGarrisonBackToWar(FortAmolLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerEastmarch(FactionToOwn, DiplomaticVictory) - - elseif HoldToSet == iRift ;9 - AddGarrisonBackToWar(FortGreenwallLocation, FactionToOwn, SkipSetOwnerCall = DiplomaticVictory) - setOwnerRift(FactionToOwn, DiplomaticVictory) - - else - log("CWScript", "SetHoldOwnerByInt(" + HoldToSet + ") parametered unrecognized. Expected an int 1-9 as HoldToCheck, got something else.") - EndIf - -EndFunction - - - -Function setCountHoldProperties() -{Calls setCountHoldsImperial() and setCountHoldsSons()} - - setCountHoldsImperial() - setCountHoldsSons() - -EndFunction - -Function setCountHoldsImperial() -{Sets CountHoldsImperial property and associated CWCountHoldsImperial global... note, call this AFTER setting any new ownerXXX property values, such as in the setOwnerXXX() function.} - int count = 0 - - if OwnerHaafingar == iImperials - count += 1 - EndIf - if OwnerReach == iImperials - count += 1 - EndIf - if OwnerHjaalmarch == iImperials - count += 1 - EndIf - if OwnerWhiterun == iImperials - count += 1 - EndIf - if OwnerFalkreath == iImperials - count += 1 - EndIf - if OwnerPale == iImperials - count += 1 - EndIf - if OwnerWinterhold == iImperials - count += 1 - EndIf - if OwnerEastmarch == iImperials - count += 1 - EndIf - if OwnerRift == iImperials - count += 1 - EndIf - - countHoldsImperial = count - CWCountHoldsImperial.value = count - -EndFunction - -Function setCountHoldsSons() -{Sets CountHoldsSons property and associated CWCountHoldsSon global... note, call this AFTER setting any new ownerXXX property values, such as in the setOwnerXXX() function.} - int count = 0 - - if OwnerHaafingar == iSons - count += 1 - EndIf - if OwnerReach == iSons - count += 1 - EndIf - if OwnerHjaalmarch == iSons - count += 1 - EndIf - if OwnerWhiterun == iSons - count += 1 - EndIf - if OwnerFalkreath == iSons - count += 1 - EndIf - if OwnerPale == iSons - count += 1 - EndIf - if OwnerWinterhold == iSons - count += 1 - EndIf - if OwnerEastmarch == iSons - count += 1 - EndIf - if OwnerRift == iSons - count += 1 - EndIf - - countHoldsSons = count - CWCountHoldsSons.value = count - -EndFunction - - - -;bool function IsSiegeRunningHere(Location LocationToCheck) -; -; location SiegeLoc = CWSiegeCity.GetLocation() -; -; bool returnVar -; -; if CWSiegeS.IsStopped() == False && SiegeLoc == LocationToCheck -; returnVar = True -; -; Else -; returnVar = False -; -; EndIf -; -; log("CWScript", "IsSiegeRunningHere(" + LocationToCheck + ") returning: " + returnVar) -; -; return returnVar -; -;EndFunction - - -;POSSIBLY OBSOLETE -Function ResetHolds() -;called by CWHoldManagerScript attached to CW - - log("CWScript", "ResetHolds()") - - setOwnerHaafingar(iCurrentOwner) - setOwnerReach(iCurrentOwner) - setOwnerHjaalmarch(iCurrentOwner) - setOwnerWhiterun(iCurrentOwner) - setOwnerFalkreath(iCurrentOwner) - setOwnerPale(iCurrentOwner) - setOwnerWinterhold(iCurrentOwner) - setOwnerEastmarch(iCurrentOwner) - setOwnerRift(iCurrentOwner) - -EndFunction - -Function setInitalOwnerKeywordDataOnly() -{A quick way to initialize keyword data at game start only, so Civil War missions fill aliases correctly. The more "thorough" function is SetInitialOwners()} - - ;# Haafingar - HaafingarHoldLocation.SetKeywordData(CWOwner, iImperials) - - FortHraggstadLocation.SetKeywordData(CWOwner, iImperials) - SolitudeLocation.SetKeywordData(CWOwner, iImperials) - - SolitudeSawmillLocation.SetKeywordData(CWOwner, iImperials) - KatlasFarmLocation.SetKeywordData(CWOwner, iImperials) - DragonBridgeLocation.SetKeywordData(CWOwner, iImperials) - - ;# Reach - ReachHoldLocation.SetKeywordData(CWOwner, iImperials) - - FortSungardLocation.SetKeywordData(CWOwner, iImperials) - MarkarthLocation.SetKeywordData(CWOwner, iImperials) - - CidhnaMineLocation.SetKeywordData(CWOwner, iImperials) - LeftHandMineLocation.SetKeywordData(CWOwner, iImperials) - SalviusFarmLocation.SetKeywordData(CWOwner, iImperials) - KarthwastenLocation.SetKeywordData(CWOwner, iImperials) - OldHroldanLocation.SetKeywordData(CWOwner, iImperials) - KolskeggrMineLocation.SetKeywordData(CWOwner, iImperials) - - ;# Hjaalmarch - HjaalmarchHoldLocation.SetKeywordData(CWOwner, iImperials) - - FortSnowhawkLocation.SetKeywordData(CWOwner, iImperials) - MorthalLocation.SetKeywordData(CWOwner, iImperials) - - StonehillsLocation.SetKeywordData(CWOwner, iImperials) -; FrostRiverFarmLocation.SetKeywordData(CWOwner, iImperials) - - ;# Whiterun - WhiterunHoldLocation.SetKeywordData(CWOwner, iImperials) - - FortGreymoorLocation.SetKeywordData(CWOwner, iImperials) - WhiterunLocation.SetKeywordData(CWOwner, iImperials) - - BattleBornFarmLocation.SetKeywordData(CWOwner, iImperials) - ChillfurrowFarmLocation.SetKeywordData(CWOwner, iImperials) - PelagiaFarmLocation.SetKeywordData(CWOwner, iImperials) - RoriksteadLocation.SetKeywordData(CWOwner, iImperials) - RiverwoodLocation.SetKeywordData(CWOwner, iImperials) -; BarleydarkFarmLocation.SetKeywordData(CWOwner, iImperials) - - ;# Falkreath - FalkreathHoldLocation.SetKeywordData(CWOwner, iImperials) - - FortNeugradLocation.SetKeywordData(CWOwner, iImperials) - FalkreathLocation.SetKeywordData(CWOwner, iImperials) - -; GraniteHillLocation.SetKeywordData(CWOwner, iImperials) - HelgenLocation.SetKeywordData(CWOwner, iImperials) -; BearsCaveMillLocation.SetKeywordData(CWOwner, iImperials) - HalfmoonMillLocation.SetKeywordData(CWOwner, iImperials) - - ;# Pale - PaleHoldLocation.SetKeywordData(CWOwner, iSons) - - FortDunstadLocation.SetKeywordData(CWOwner, iSons) - DawnstarLocation.SetKeywordData(CWOwner, iSons) - -; HeljarchenLocation.SetKeywordData(CWOwner, iSons) - AngasMillLocation.SetKeywordData(CWOwner, iSons) - LoreiusFarmLocation.SetKeywordData(CWOwner, iSons) - - ;# Winterhold - WinterholdHoldLocation.SetKeywordData(CWOwner, iSons) - - FortKastavLocation.SetKeywordData(CWOwner, iSons) - WinterholdLocation.SetKeywordData(CWOwner, iSons) - - WhistlingMineLocation.SetKeywordData(CWOwner, iSons) - - ;# Eastmarch - EastmarchHoldLocation.SetKeywordData(CWOwner, iSons) - - FortAmolLocation.SetKeywordData(CWOwner, iSons) - WindhelmLocation.SetKeywordData(CWOwner, iSons) - - BrandyMugFarmLocation.SetKeywordData(CWOwner, iSons) - HlaaluFarmLocation.SetKeywordData(CWOwner, iSons) - HollyfrostFarmLocation.SetKeywordData(CWOwner, iSons) - KynesgroveLocation.SetKeywordData(CWOwner, iSons) - DarkwaterCrossingLocation.SetKeywordData(CWOwner, iSons) - MixwaterMillLocation.SetKeywordData(CWOwner, iSons) - - ;# Rift - RiftHoldLocation.SetKeywordData(CWOwner, iSons) - - FortGreenwallLocation.SetKeywordData(CWOwner, iSons) - RiftenLocation.SetKeywordData(CWOwner, iSons) - - SnowShodFarmLocation.SetKeywordData(CWOwner, iSons) - ;GoldenglowFarmLocation -- GoldenGlowFarm is NOT a normal location. It's quest specific area spawning it's own guards, and should not be part of the Civil War. - MerryfairFarmLocation.SetKeywordData(CWOwner, iSons) - IvarsteadLocation.SetKeywordData(CWOwner, iSons) - ShorsStoneLocation.SetKeywordData(CWOwner, iSons) - HeartwoodMillLocation.SetKeywordData(CWOwner, iSons) - SarethiFarmLocation.SetKeywordData(CWOwner, iSons) - -EndFunction - - -Function setInitialOwners() -{Called in the OnInit block, one time set up of initial owners of all the locations.} - - setOwnerHaafingar(iImperials) - setOwnerReach(iImperials) - setOwnerHjaalmarch(iImperials) - setOwnerWhiterun(iImperials) - setOwnerFalkreath(iImperials) - setOwnerPale(iSons) - setOwnerWinterhold(iSons) - setOwnerEastmarch(iSons) - setOwnerRift(iSons) - -EndFunction - - -Function setOwnerHaafingar(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerHaafingar() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - HaafingarHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(HaafingarHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerHaafingar = FactionToOwn - HaafingarHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - setOwner(FortHraggstadLocation, FactionToOwn, MilitaryCampHaafingarSonsLocation, SolitudeLocation, SolitudeSawmillLocation, KatlasFarmLocation, DragonBridgeLocation) - - - log("CWScript", "CW Script setOwnerHaafingar() finished.") - -EndFunction - -Function setOwnerReach(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerReach() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - ReachHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(ReachHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerReach = FactionToOwn - ReachHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortSungardLocation, FactionToOwn, MilitaryCampReachImperialLocation, MilitaryCampReachSonsLocation) - setOwner(MarkarthLocation, FactionToOwn, CidhnaMineLocation, LeftHandMineLocation, SalviusFarmLocation, KarthwastenLocation, OldHroldanLocation, KolskeggrMineLocation) - - log("CWScript", "CW Script setOwnerReach() finished.") - -EndFunction - -Function setOwnerHjaalmarch(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerHjaalmarch() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - HjaalmarchHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(HjaalmarchHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerHjaalmarch = FactionToOwn - HjaalmarchHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortSnowhawkLocation, FactionToOwn, MilitaryCampHjaalmarchImperialLocation, MilitaryCampHjaalmarchSonsLocation, MorthalLocation, StonehillsLocation) - - log("CWScript", "CW Script setOwnerHjaalmarch() finished.") - -EndFunction - -Function setOwnerWhiterun(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerWhiterun() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - WhiterunHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(WhiterunHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerWhiterun = FactionToOwn - WhiterunHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortGreymoorLocation, FactionToOwn, MilitaryCampWhiterunImperialLocation, MilitaryCampWhiterunSonsLocation) - setOwner(WhiterunLocation, FactionToOwn, BattleBornFarmLocation, ChillfurrowFarmLocation, PelagiaFarmLocation, RoriksteadLocation, RiverwoodLocation) - - log("CWScript", "CW Script setOwnerWhiterun() finished.") - -EndFunction - -Function setOwnerFalkreath(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerFalkreath() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - FalkreathHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(FalkreathHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerFalkreath = FactionToOwn - FalkreathHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortNeugradLocation, FactionToOwn, MilitaryCampFalkreathImperialLocation, MilitaryCampFalkreathSonsLocation, FalkreathLocation, HelgenLocation, HalfmoonMillLocation) - - log("CWScript", "CW Script setOwnerFalkreath() finished.") - -EndFunction - -Function setOwnerPale(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerPale() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - PaleHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(PaleHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerPale = FactionToOwn - PaleHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortDunstadLocation, FactionToOwn, MilitaryCampPaleImperialLocation, MilitaryCampPaleSonsLocation, DawnstarLocation, AngasMillLocation, LoreiusFarmLocation) - - log("CWScript", "CW Script setOwnerPale() finished.") - -EndFunction - -Function setOwnerWinterhold(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerWinterhold() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - WinterholdHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(WinterholdHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerWinterhold = FactionToOwn - WinterholdHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortKastavLocation, FactionToOwn, MilitaryCampWinterholdImperialLocation, MilitaryCampWinterholdSonsLocation, WinterholdLocation, WhistlingMineLocation) - - log("CWScript", "CW Script setOwnerWinterhold() finished.") - -EndFunction - -Function setOwnerEastmarch(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerEastmarch() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - EastmarchHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(EastmarchHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerEastmarch = FactionToOwn - EastmarchHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortAmolLocation, FactionToOwn, MilitaryCampEastmarchImperialLocation) - setOwner(WindhelmLocation, FactionToOwn, BrandyMugFarmLocation, HlaaluFarmLocation, HollyfrostFarmLocation, KynesgroveLocation, DarkwaterCrossingLocation, MixwaterMillLocation) - - log("CWScript", "CW Script setOwnerEastmarch() finished.") - - EndFunction - -Function setOwnerRift(int FactionToOwn, bool DiplomaticVictory = false) - log("CWScript", "CW Script setOwnerRift() started." + "FactionToOwn: " + FactionToOwn + ", DiplomaticVictory: " + DiplomaticVictory) - - if DiplomaticVictory - RiftHoldLocation.SetKeywordData(CWDiplomaticVictory, 1) - ClearHoldCrimeGold(RiftHoldLocation) - EndIf - - if FactionToOwn != iCurrentOwner - ownerRift = FactionToOwn - RiftHoldLocation.SetKeywordData(CWOwner, FactionToOwn) - EndIf - - setCountHoldProperties() - - setOwner(FortGreenwallLocation, FactionToOwn, MilitaryCampRiftImperialLocation, MilitaryCampRiftSonsLocation) - setOwner(RiftenLocation, FactionToOwn, SnowShodFarmLocation, MerryfairFarmLocation, IvarsteadLocation, ShorsStoneLocation, HeartwoodMillLocation, SarethiFarmLocation) - - ;Reminder: -- GoldenGlowFarm is NOT a normal location. It's quest specific area spawning it's own guards, and should not be part of the Civil War. - - log("CWScript", "CW Script setOwnerRift() finished.") - -EndFunction - - -Function CreateMissions(Location HoldLocation, ObjectReference CurrentFieldCO, bool ForceFinalSiege = False, ObjectReference CampaignStartMarker = None) - - if WarIsActive == -1 - log("CWScript", "CreateMissions(" + HoldLocation + ", " + CurrentFieldCO + ") WarIsActive != 1, so we are NOT creating story events", 1, 1, true) - - return - - EndIf - - log("CWScript", "CreateMissions(" + HoldLocation + ", " + CurrentFieldCO + ") creating story events.") - - int HoldID = GetHoldID(HoldLocation) - GlobalVariable myCWObjGlobal = GetCWObjGlobal(HoldID) - - -; ;*** THIS IS A HACK FOR NEW PARADIGM TO FIT BACKWARDS COMPATIBLE WITH THE OLDER SYSTEM. RATHER THAN DOING RANDOM MISSIONS UNTIL THE READINESS REACHES 99%, WE ARE SIMPLY COUNTING THE NUMBER OF MISSIONS -; if HoldLocation == FalkreathHoldLocation && CWCountMissionsDone.GetValue() == 1 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == ReachHoldLocation && CWCountMissionsDone.GetValue() == 3 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == HjaalmarchHoldLocation && CWCountMissionsDone.GetValue() == 5 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == HaafingarHoldLocation && CWCountMissionsDone.GetValue() == 6 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == PaleHoldLocation && CWCountMissionsDone.GetValue() == 2 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == RiftHoldLocation && CWCountMissionsDone.GetValue() == 4 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == WinterholdHoldLocation && CWCountMissionsDone.GetValue() == 5 -; myCWObjGlobal.SetValue(99) -; -; elseif HoldLocation == EastmarchHoldLocation && CWCountMissionsDone.GetValue() == 6 -; myCWObjGlobal.SetValue(99) -; -; -; Else -; myCWObjGlobal.SetValue(0) -; -; EndIf -; -; ;*** - - - ;*** THIS IS A HACK FOR NEW PARADIGM TO FIT BACKWARDS COMPATIBLE WITH THE OLDER SYSTEM. - if HoldLocation == HaafingarHoldLocation && HaafingarFortBattleComplete ;set in CWFortSiegeFort stage 9000 - log("CWScript", "CreateMissions() HaafingarHoldLocation and HaafingarFortBattleComplete, setting CWObjHaafingar to 99") - myCWObjGlobal.SetValue(99) - - elseif HoldLocation == EastmarchHoldLocation && EastmarchFortBattleComplete ;set in CWFortSiegeFort stage 9000 - log("CWScript", "CreateMissions() EastmarchHoldLocation and EastmarchFortBattleComplete, setting CWObjEastmarch to 99") - myCWObjGlobal.SetValue(99) - - else - log("CWScript", "CreateMissions() Not a final hold, or not ready for final battle, setting CWObjxxx to 0") - myCWObjGlobal.SetValue(0) - - endif - ;*** - - - if myCWObjGlobal.GetValue() >= 99 || ForceFinalSiege == true - log("CWScript", "CreateMissions() myCWObjGlobal >= 100, will start resolution mission, checking to see if the capital is a city") - - Location Capital = GetCapitalLocationForHold(HoldLocation) - - if Capital.HasKeyword(LocTypeCity) - - ;ITS POSSIBLE YOU CAN TRIGGER "DEFENSE" SIEGES IF THE CWOBJ IS 99 (which for ease of implementation Haagingar and Eastmarch are set to) - ;WE DON'T WANT THAT TO HAPPEN THUS THIS CHECK: - if (Capital == SolitudeLocation && PlayerAllegiance == iImperials) || (Capital == WindhelmLocation && PlayerAllegiance == iSons) - log("CWScript", "CreateMissions() Capital is final hold capital, owned by player's faction, not generating defense siege:" + Capital + ", playerAllegiance =" + PlayerAllegiance, 1) - - Else - log("CWScript", "CreateMissions() Capital is a city, will start CWSiege quest") - CWSiegeStart.SendStoryEvent(Capital, CurrentFieldCO) - - EndIf - - - Else - if HoldLocation.GetKeywordData(CWOwner) == PlayerAllegiance - log("CWScript", " WARNING: CreateMissions() Capital is not a city AND player's faction owns the hold, not implemented fully", 2, true, true) - ;CWFortSiegeMinorCapitalStart.SendStoryEvent(Capital, CurrentFieldCO, CurrentFieldCO) - - Else - log("CWScript", "CreateMissions() Capital is not a city, player's faction does not own the hold, will start a CWFortSiege quest using CWFortSiegeMinorCapitalStart keyword") - - ;safety check, in case you just finished a capital siege, and before it finished shutting down, you get another one - highly unlikely, put I can envision happening - int waitingFor - - - While CWFortSiegeCapital.IsStopped() == False - waitingFor += 1 - utility.wait(1) - - Log("CWScript", self + "CreateMissions(" +HoldLocation + ") WAITING for CWFortSiegeCapital.IsStopped() == false. Have been waiting for:" + waitingFor, 1, true, true) - - ;this is important enough to make sure even if we aren't explicitly testing in Civil War debug mode we get a message about it -; debug.trace(self + "CreateMissions(" + HoldLocation + ") WAITING for CWFortSiegeCapital.IsStopped() == false. Have been waiting for:" + waitingFor, 1) - - - ;!!!NEED A CHECK HERE TO MAKE SURE THAT THE CWFortSiegeCapital ISN'T FILLED ALREADY WITH THIS Capital... - if CWFortSiegeCapitalFort.GetLocation() != Capital - log("CWScript", "CreateMissions(" + HoldLocation + ") sees the Capital " + Capital + " is already in CWFortSiegeCapital Fort Aliases, BAILING OUT of CreateMissions().", 1 ) - return - EndIf - - - EndWhile - - log("CWScript", "CreateMissions() Calling CWFortSiegeMinorCapitalStart.SendStoryEvent(" + Capital + ", " + CurrentFieldCO + ", " + CampaignStartMarker + ")") - CWFortSiegeMinorCapitalStart.SendStoryEvent(Capital, CurrentFieldCO, CampaignStartMarker) - - EndIf - - endif - - Else - log("CWScript", "CreateMissions() myCWObjGlobal < 100, will start normal missions") - - CWMissionStart.SendStoryEvent(HoldLocation, CurrentFieldCO, CampaignStartMarker, aiValue1 = 1) - - EndIf - - - log("CWScript", "CreateMissions(" + HoldLocation + ", " + CurrentFieldCO + "," + CampaignStartMarker + ") done creating story events.") - -EndFunction - -function SetFieldCOAlias(ObjectReference RefToForceIntoFieldCOAlias) - log("CWScript", "SetFieldCOAlias(" + RefToForceIntoFieldCOAlias + ")") - - FieldCO.ForceRefTo(RefToForceIntoFieldCOAlias) -EndFunction - -function GiveMissionReward() - log("CWScript", "GiveMissionReward()") - Game.GetPlayer().AddItem(CWMissionReward) - -EndFunction - - -function setPlayerFactionRank(int RankToSetTo) - log("CWScript", "setPlayerFactionRank([" + RankToSetTo + "]) and adding reward.") - - PlayerRank = RankToSetTo - - Actor PlayerRef = Game.GetPlayer() - - if PlayerAllegiance == iImperials - - if RankToSetTo == 1 - Game.GetPlayer().AddItem(CWRank1RewardImperial) - Elseif RankToSetTo == 2 - Game.GetPlayer().AddItem(CWRank2RewardImperial) - ElseIf RankToSetTo == 3 - Game.GetPlayer().AddItem(CWRank3RewardImperial) - elseif RankToSetTo == 4 - Game.GetPlayer().AddItem(CWRank4RewardImperial) - Else - log("CWScript", "setPlayerFactionRank() expected RankToSetTo to be 1,2,3 or 4. Instead got:" + RankToSetTo, 2, true) - EndIf - - Elseif PlayerAllegiance == iSons - - if RankToSetTo == 1 - Game.GetPlayer().AddItem(CWRank1RewardSons) - UlfricRef.SetRelationshipRank(PlayerRef, 1) - Elseif RankToSetTo == 2 - Game.GetPlayer().AddItem(CWRank2RewardSons) - UlfricRef.SetRelationshipRank(PlayerRef, 2) - ElseIf RankToSetTo == 3 - Game.GetPlayer().AddItem(CWRank3RewardSons) - elseif RankToSetTo == 4 - Game.GetPlayer().AddItem(CWRank4RewardSons) - Else - log("CWScript", "setPlayerFactionRank() expected RankToSetTo to be 1,2,3 or 4. Instead got:" + RankToSetTo, 2, True) - EndIf - - Else - - log("CWScript", "setPlayerFactionRank() expected PlayerAllegiance to be 1, or 2. Instead got:" + PlayerAllegiance, 2, True) - - EndIf - - - -EndFunction - -function RewardPlayerForReclaimingHold() - if PlayerAllegiance == iImperials - Game.GetPlayer().AddItem(CWRank2RewardImperial) - Elseif PlayerAllegiance == iSons - Game.GetPlayer().AddItem(CWRank2RewardSons) - Else - log("CWScript", "RewardPlayerForReclaimingHold() expected PlayerAllegiance to be 1, or 2. Instead got:" + PlayerAllegiance, 2, True) - - EndIf - -EndFunction - -function SetSoldierAliasDialogueFactions(ReferenceAlias SoldierAlias, bool AddToWaitingToAttack = False, bool AddToWaitingToDefend = False) -{Adds the passed in Alias's actor to the appropriate CWDialogueSoldierWaitingToAttack/DefendFaction.} - - Actor SoldierActor = SoldierAlias.GetActorReference() - - log("CWScript", "SetSoldierAliasDialogueFactions() adding " + SoldierActor + " to faction CWDialogueSoldierFaction") - - ;Always add to the soldier dialogue faction: - SoldierActor.AddToFaction(CWDialogueSoldierFaction) - - if AddToWaitingToAttack - log("CWScript", "SetSoldierAliasDialogueFactions() adding " + SoldierActor + " to faction CWDialogueSoldierWaitingToAttackFaction") - SoldierActor.AddToFaction(CWDialogueSoldierWaitingToAttackFaction) - EndIf - - if AddToWaitingToDefend - log("CWScript", "SetSoldierAliasDialogueFactions() adding " + SoldierActor + " to faction CWDialogueSoldierWaitingToDefendFaction") - SoldierActor.AddToFaction(CWDialogueSoldierWaitingToDefendFaction) - EndIf - - -EndFunction - -Function ContributeToSalaryPool() - if PlayerRank == 0 - salary += (BaseSalary) as int - elseif PlayerRank == 1 - salary += (BaseSalary * SalaryMultRank1) as int - elseif PlayerRank == 2 - salary += (BaseSalary * SalaryMultRank2) as int - elseif PlayerRank == 3 - salary += (BaseSalary * SalaryMultRank3) as int - elseif PlayerRank >= 4 - salary += (BaseSalary * SalaryMultRank4) as int - EndIf - -EndFunction - -function paySalary() -{Pay player a salary after campaign based on his rank} - Game.GetPlayer().AddItem(Gold001, salary) - salary = 0 -EndFunction - -Function donateSalary() -{player has donated his salary to the cause... right now this is just flavor, we may want it to contribute something to the attack delta, increase favor points, etc.} - salary = 0 -EndFunction - -ObjectReference Function GetFactionHQMarkerForActor(Actor ActorToCheck) -{Returns the marker in the alias corresponding to the FactionHQ based on whether the actor is in CWImperialFaction or CWSonsFaction.} -;Used by CWEscapeCityEscapeDoorScript on EscapeDoor alias in CWEscapeCity Quest - int ActorFaction = GetActorAllgeiance(ActorToCheck) - - ObjectReference FactionHQMarker - - if ActorFaction == iImperials - FactionHQMarker = ImperialFactionHQMarker.GetReference() - - elseif ActorFaction == iSons - FactionHQMarker = SonsFactionHQMarker.GetReference() - Else - log("CWScript", " WARNING: GetFactionHQForActor() can't determine which faction this actor belongs to:" + ActorToCheck, 2) - EndIf - - log("CWScript", "GetFactionHQForActor(" + ActorToCheck + ") returning " + FactionHQMarker) - - return FactionHQMarker - -EndFunction - - -ObjectReference Function GetExiledMarkerForActor(Actor ActorToCheck) -{Returns the marker in the alias corresponding to the ExiledMarker based on whether the actor is in GovImperial or GovSons factions.} -;Used by CWEscapeCityEscapeDoorScript on EscapeDoor alias in CWEscapeCity Quest -;NOTE THIS DUPLICATES SOME FUNCTIONALITY ALSO FOUND IN CWGovernmentScript and CWGovernment quest. - - ObjectReference ExileMarker - - if ActorToCheck.IsInFaction(GovImperial) - ExileMarker = ExiledImperialMarker.GetReference() - - elseif ActorToCheck.IsInFaction(GovSons) - ExileMarker = ExiledSonsMarker.GetReference() - Else - log("CWScript", " WARNING: GetExiledMarkerForActor() can't determine which faction this actor belongs to:" + ActorToCheck, 2) - EndIf - - log("CWScript", "GetExiledMarkerForActor(" + ActorToCheck + ") returning " + ExileMarker) - - return ExileMarker - -EndFunction - -function StartCWCitizensFlee(Location LocationOfBattle) - log("CWScript", "StartCWCitizensFlee(" + LocationOfBattle + ")") - - int waitTime = 0 - bool bailOut = False - - if CWCitizensFlee.IsStopped() == False - log("CWScript", " WARNING: StartCWCitizensFlee() the CWCitizensFlee quest is currently running, stopping it and starting a new one." , 2, true, true) - - CWCitizensFlee.Stop() - - while CWCitizensFlee.IsStopped() == false && bailOut == False - log("CWScript", " WARNING: StartCWCitizensFlee() the CWCitizensFlee quest is currently running, waiting for it to stop completely. Have been waiting for " +waitTime , 1) - utility.wait(1) - - waitTime +=1 - - if waitTime > 30 - - log("CWScript", " WARNING: StartCWCitizensFlee() the CWCitizensFlee quest is currently running, have been waiting too long. Bailing out." , 1) - bailOut = True - - EndIf - - EndWhile - - EndIf - - CWCitizensFleeStart.SendStoryEvent(LocationOfBattle) - - -EndFunction - -function StopCWCitizensFlee() - log("CWScript", "StopCWCitizensFlee() calling Stop() on CWCitizensFlee quest") - CWCitizensFlee.Stop() - -EndFunction - -function Persuade(Actor Target) -{Calls the favor script function} - log("CWScript", "Persuade(" + Target + ") calling Persuade() on DialogueFavorGeneric quest's FavorDialogueScript") - DialogueFavorGenericS.Persuade(Target) - -EndFunction - -function Bribe(Actor Target) -{Calls the favor script function} - log("CWScript", "Bribe(" + Target + ") calling Bribe() on DialogueFavorGeneric quest's FavorDialogueScript") - DialogueFavorGenericS.Bribe(Target) - -EndFunction - -function Intimidate(Actor Target) -{Calls the favor script function} - log("CWScript", "Intimidate(" + Target + ") calling Intimidate() on DialogueFavorGeneric quest's FavorDialogueScript") - DialogueFavorGenericS.Intimidate(Target) - -EndFunction - -function Brawl(Actor Target) -{Calls the favor script function} - log("CWScript", "Brawl(" + Target + ") calling Brawl() on DialogueFavorGeneric quest's FavorDialogueScript") - DialogueFavorGenericS.Brawl(Target) - -EndFunction - -function GiveGift(Actor Target) -{Calls the favor script function} - log("CWScript", "GiveGift(" + Target + ") calling GiveGift() on DialogueFavorGeneric quest's FavorDialogueScript") - DialogueFavorGenericS.GiveGift(Target) - -EndFunction - -function ToggleOffComplexWIInteractions(LocationAlias LocationAliasToToggle) - Log("CWMissionScript", self + "ToggleOffComplexWIInteractions(" + LocationAliasToToggle + ") calling function on WIFunctionScript") - WIs.DisallowComplexInteractions(LocationAliasToToggle.GetLocation()) - -EndFunction - -function ToggleOnComplexWIInteractions(LocationAlias LocationAliasToToggle) - Log("CWMissionScript", self + "ToggleOnComplexWIInteractions(" + LocationAliasToToggle + ") calling function on WIFunctionScript") - WIs.AllowComplexInteractions(LocationAliasToToggle.GetLocation()) - -EndFunction - -function ToggleOffWIDragons(LocationAlias LocationAliasToToggle) - Log("CWMissionScript", self + "ToggleOffWIDragons(" + LocationAliasToToggle + ") calling function on WIFunctionScript") - WIs.DisallowDragons(LocationAliasToToggle.GetLocation()) - -EndFunction - -function ToggleOnWIDragons(LocationAlias LocationAliasToToggle) - Log("CWMissionScript", self + "ToggleOnWIDragons(" + LocationAliasToToggle + ") calling function on WIFunctionScript") - WIs.AllowDragons(LocationAliasToToggle.GetLocation()) - -EndFunction - - - - - - - - - -;************************************************************************************************************ -;*********************************** OBSOLETE FUNCTIONS ***************************************************** -;************************************************************************************************************ -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** -;*** - - - - Function OutputXMLRowOpenTag(string RowName) - log("CWScript", "CW XML: <" + RowName + ">" ) -EndFunction - - Function OutputXMLRowCloseTag(string RowName) - log("CWScript", "CW XML: " ) -EndFunction - - Function OutputXMLField(string FieldName, string fieldValue) - log("CWScript", "CW XML: <" + FieldName + ">" + fieldValue + "" ) -EndFunction - -Function OutputCampaignStatsXMLRow() - ;NOTE: You'll need to a) filter the warnings for "CW xml:" - ;b) remove "[Timestamp] CW XML:" from each line, - ;c) add tag at head and foot of document - - - OutputXMLRowOpenTag("CampaignStats") - - outputCampaignStatsXMLRowA() - outputCampaignStatsXMLRowB() - - OutputXMLRowCloseTag("CampaignStats") - -EndFunction - -; to get around large function compiler bug. These should go back inside the maine outputCampaignStatsXMLRow function when that bug is fixed -Function outputCampaignStatsXMLRowA() - OutputXMLField("countCampaigns", countCampaigns as string) - - OutputXMLField("ContestedHold", HoldName(ContestedHold)) - OutputXMLField("Attacker", FactionName(Attacker)) - OutputXMLField("Defender", FactionName(Defender)) - - OutputXMLField("OwnerHaafingar", FactionName(OwnerHaafingar)) - OutputXMLField("OwnerReach", FactionName(OwnerReach)) - OutputXMLField("OwnerHjaalmarch", FactionName(OwnerHjaalmarch)) - OutputXMLField("OwnerWhiterun", FactionName(OwnerWhiterun)) - OutputXMLField("OwnerFalkreath", FactionName(OwnerFalkreath)) - OutputXMLField("OwnerPale", FactionName(OwnerPale)) - OutputXMLField("OwnerWinterhold", FactionName(OwnerWinterhold)) - OutputXMLField("OwnerEastmarch", FactionName(OwnerEastmarch)) - OutputXMLField("OwnerRift", FactionName(OwnerRift)) -EndFunction - - -Function outputCampaignStatsXMLRowB() - OutputXMLField("countWinImperials", countWinImperials as string) - OutputXMLField("countWinSons", countWinSons as string) - OutputXMLField("countWinReachImperials", countWinReachImperials as string) - OutputXMLField("countWinReachSons", countWinReachSons as string) - OutputXMLField("countWinHjaalmarchImperials", countWinHjaalmarchImperials as string) - OutputXMLField("countWinHjaalmarchSons", countWinHjaalmarchSons as string) - OutputXMLField("countWinWhiterunImperials", countWinWhiterunImperials as string) - OutputXMLField("countWinWhiterunSons", countWinWhiterunSons as string) - OutputXMLField("countWinFalkreathImperials", countWinFalkreathImperials as string) - OutputXMLField("countWinFalkreathSons", countWinFalkreathSons as string) - OutputXMLField("countWinPaleImperials", countWinPaleImperials as string) - OutputXMLField("countWinPaleSons", countWinPaleSons as string) - OutputXMLField("countWinWinterholdImperials", countWinWinterholdImperials as string) - OutputXMLField("countWinWinterholdSons", countWinWinterholdSons as string) - OutputXMLField("countWinRiftImperials", countWinRiftImperials as string) - OutputXMLField("countWinRiftSons", countWinRiftSons as string) -EndFunction -; - -function resetStrengthPoints() -{Clears the strHOLDImperial/Sons properties.} - strHaafingarImperial = 0 - strHaafingarSons = 0 - strReachImperial = 0 - strReachSons = 0 - strHjaalmarchImperial = 0 - strHjaalmarchSons = 0 - strWhiterunImperial = 0 - strWhiterunSons = 0 - strFalkreathImperial = 0 - strFalkreathSons = 0 - strPaleImperial = 0 - strPaleSons = 0 - strWinterholdImperial = 0 - strWinterholdSons = 0 - strEastmarchImperial = 0 - strEastmarchSons = 0 - strRiftImperial = 0 - strRiftSons = 0 - - EndFunction - - function setStrengthPoints() -{Sets the strXXXHoldImperials strXXXHoldSons values for all the holds for each faction.} - - ;clear properties - resetStrengthPoints() - - ;these next functions are broken into seperate functions rather than living directly in this function to get around a bug running large functions in game. I probably will leave it this way even after the bug is fixed. - setStrengthPointsHaafingar() - setStrengthPointsReach() - setStrengthPointsHjaalmarch() - setStrengthPointsWhiterun() - setStrengthPointsFalkreath() - setStrengthPointsPale() - setStrengthPointsWinterhold() - setStrengthPointsEastmarch() - setStrengthPointsRift() - -EndFunction - -; -;Note for self: -;These functions setSrengthPointsHOLDxxx() functions exist solely to get around a bug dealing with a long function. They all used to live in the setStrengthPoints() function. Once that bug is dealt with, I could copy these back into that function. But that won't serve much purpose. -;If I had an array, I could set up arrays for adjacent hold data, and then abstract these into a single function. But I'm not sure when/if we'll get arrays in the scripting language -function setStrengthPointsHaafingar() - ;Haafingar -- adj holds = Reach, Hjaalmarch - if OwnerHaafingar == iImperials - strReachImperial = strReachImperial + StrValueHaafingar - strHjaalmarchImperial = strHjaalmarchImperial + StrValueHaafingar - else ;owner is iSons - strReachSons = strReachSons + StrValueHaafingar - strHjaalmarchSons = strHjaalmarchSons + StrValueHaafingar - endif -EndFunction - -function setStrengthPointsReach() - ;Reach -- adj holds = Haafingar, Hjaalmarch, Whiterun, Falkreath - if OwnerReach == iImperials - strHaafingarImperial = strHaafingarImperial + StrValueReach - strHjaalmarchImperial = strHjaalmarchImperial + StrValueReach - strWhiterunImperial = strWhiterunImperial + StrValueReach - strFalkreathImperial = strFalkreathImperial + StrValueReach - else ;owner is iSons - strHaafingarSons = strHaafingarSons + StrValueReach - strHjaalmarchSons = strHjaalmarchSons + StrValueReach - strWhiterunSons = strWhiterunSons + StrValueReach - strFalkreathSons = strFalkreathSons + StrValueReach - endif -EndFunction - -function setStrengthPointsHjaalmarch() - ;Hjaalmarch -- adj holds = Haafingar, Reach, Whiterun, Pale - if OwnerHjaalmarch == iImperials - strHaafingarImperial = strHaafingarImperial + StrValueHjaalmarch - strReachImperial = strReachImperial + StrValueHjaalmarch - strWhiterunImperial = strWhiterunImperial + StrValueHjaalmarch - strPaleImperial = strPaleImperial + StrValueHjaalmarch - else ;owner is iSons - strHaafingarSons = strHaafingarSons + StrValueHjaalmarch - strReachSons = strReachSons + StrValueHjaalmarch - strWhiterunSons = strWhiterunSons + StrValueHjaalmarch - strPaleSons = strPaleSons + StrValueHjaalmarch - endif -endFunction - -function setStrengthPointsWhiterun() - ;Whiterun -- adj holds = Reach, Hjaalmarch, Falkreath, Pale, Eastmarch, Rift - if OwnerWhiterun== iImperials - strReachImperial = strReachImperial + StrValueWhiterun - strHjaalmarchImperial = strHjaalmarchImperial + StrValueWhiterun - strFalkreathImperial = strFalkreathImperial + StrValueWhiterun - strPaleImperial = strPaleImperial + StrValueWhiterun - strEastmarchImperial = strEastmarchImperial + StrValueWhiterun - strRiftImperial = strRiftImperial + StrValueWhiterun - else ;owner is iSons - strReachSons = strReachSons + StrValueWhiterun - strHjaalmarchSons = strHjaalmarchSons + StrValueWhiterun - strFalkreathSons = strFalkreathSons + StrValueWhiterun - strPaleSons = strPaleSons + StrValueWhiterun - strEastmarchSons = strEastmarchSons + StrValueWhiterun - strRiftSons = strRiftSons + StrValueWhiterun - endif -EndFunction - -function setStrengthPointsFalkreath() - ;Falkreath -- adj holds = Reach, Whiterun, Rift - if OwnerFalkreath== iImperials - strReachImperial = strReachImperial + StrValueFalkreath - strWhiterunImperial = strWhiterunImperial + StrValueFalkreath - strRiftImperial = strRiftImperial + StrValueFalkreath - else ;owner is iSons - strReachSons = strReachSons + StrValueFalkreath - strWhiterunSons = strWhiterunSons + StrValueFalkreath - strRiftSons = strRiftSons + StrValueFalkreath - endif -EndFunction - -function setStrengthPointsPale() - ;Pale -- adj holds = Hjaalmarch, Whiterun, Winterhold, Eastmarch - if OwnerPale == iImperials - strHjaalmarchImperial = strHjaalmarchImperial + StrValuePale - strWhiterunImperial = strWhiterunImperial + StrValuePale - strWinterholdImperial = strWinterholdImperial + StrValuePale - strEastmarchImperial = strEastmarchImperial + StrValuePale - else ;owner is iSons - strHjaalmarchSons = strHjaalmarchSons + StrValuePale - strWhiterunSons = strWhiterunSons + StrValuePale - strWinterholdSons = strWinterholdSons + StrValuePale - strEastmarchSons = strEastmarchSons + StrValuePale - endif -EndFunction - -function setStrengthPointsWinterhold() - ;Winterhold -- adj holds = Pale, Eastmarch - if OwnerWinterhold == iImperials - strPaleImperial = strPaleImperial + StrValueWinterhold - strEastmarchImperial = strEastmarchImperial + StrValueWinterhold - else ;owner is iSons - strPaleSons = strPaleSons + StrValueWinterhold - strEastmarchSons = strEastmarchSons + StrValueWinterhold - endif -EndFunction - -function setStrengthPointsEastmarch() - ;Eastmarch -- adj holds = Winterhold, Pale, Whiterun, Rift - if OwnerEastmarch == iImperials - strWinterholdImperial = strWinterholdImperial + StrValueEastmarch - strPaleImperial = strPaleImperial + StrValueEastmarch - strWhiterunImperial = strWhiterunImperial + StrValueEastmarch - strRiftImperial = strRiftImperial + StrValueEastmarch - else ;owner is iSons - strWinterholdSons = strWinterholdSons + StrValueEastmarch - strPaleSons = strPaleSons + StrValueEastmarch - strWhiterunSons = strWhiterunSons + StrValueEastmarch - strRiftSons = strRiftSons + StrValueEastmarch - endif -EndFunction - -function setStrengthPointsRift() - ;Rift -- adj holds = Whiterun, Falkreath, Eastmarch - if OwnerRift == iImperials - strWhiterunImperial = strWhiterunImperial + StrValueRift - strFalkreathImperial = strFalkreathImperial + StrValueRift - strEastmarchImperial = strEastmarchImperial + StrValueRift - else ;owner is iSons - strWhiterunSons = strWhiterunSons + StrValueRift - strFalkreathSons = strFalkreathSons + StrValueRift - strEastmarchSons = strEastmarchSons + StrValueRift - endif -EndFunction -; - -function StartNewCampaign() -{Sets Attacker, Defender, Contested Hold, and strHOLDXXX properties.} - - log("CWScript", "StartNewCampagin() will set CWScript properties for new campaign.") - - SetStrengthPoints() - attacker = ChooseAttackingFaction(CWDebugForceAttacker.Value as int) - if attacker == iImperials - defender = iSons - Else - defender = iImperials - EndIf - - ;set the CWAttacker and CWDefender globals for use in condition functions where you want to check against their value - CWAttacker.value = attacker - CWDefender.value = defender - - contestedHold = ChooseHoldToAttack(attacker, CWDebugForceHold.value as int) - CWContestedHold.value = contestedHold - setAttackDelta() - purchaseDelta = AttackDelta - countCampaigns += 1 - - log("CWScript", "StartNewCampagin() finished setting CWScript properties for new campaign.") - log("CWScript", "StartNewCampagin() Attacker=" + Attacker + ", Defender=" + Defender + ", ContestedHold=" + ContestedHold + ", AttackDelta=" +AttackDelta) - - if DebugDBTraces == 1 - outputCampaignStatsXMLRow() - endif - - ;Start the campaign quest - if debugForceOffscreenResult == 0 - startCampaignQuest(ContestedHold) - - Else ;we are in forced offscreen mode - resolveOffscreen() - - EndIf - -EndFunction - - - - -int Function GetStrengthPoints(int FactionToCheck, int HoldToCheck) -{Returns an int specifying the strength points of the FactionToCheck (1 = Imperial, 2 = Sons) in HoldToCheck(1-9), -1 = FAIL} - int strImperial ;the strength points of the faction in the hold - int strSons ;the strength points of the faction in the hold - - ;get each factions strength points for the hold in question - if HoldToCheck == iHaafingar ;1 - strImperial = strHaafingarImperial - strSons = strHaafingarSons - elseif HoldToCheck == iReach ; 2 - strImperial = strReachImperial - strSons = strReachSons - elseif HoldToCheck == iHjaalmarch ;3 - strImperial = strHjaalmarchImperial - strSons = strHjaalmarchSons - elseif HoldToCheck == iWhiterun ;4 - strImperial = strWhiterunImperial - strSons = strWhiterunSons - elseif HoldToCheck == iFalkreath ;5 - strImperial = strFalkreathImperial - strSons = strFalkreathSons - elseif HoldToCheck == iPale ;6 - strImperial = strPaleImperial - strSons = strPaleSons - elseif HoldToCheck == iWinterhold ;7 - strImperial = strWinterholdImperial - strSons = strWinterholdSons - elseif HoldToCheck == iEastmarch ;8 - strImperial = strEastmarchImperial - strSons = strEastmarchSons - elseif HoldToCheck == iRift ;9 - strImperial = strRiftImperial - strSons = strRiftSons - else - log("CWScript", "GetStrengthPoints() HoldToCheck parametered unrecognized. Expected an int 1-9: got " + HoldToCheck) - return -1 - EndIf - - ;return the strength points of the hold for the faction in question - If FactionToCheck == iImperials - return strImperial - ElseIf FactionToCheck == iSons - return strSons - Else - log("CWScript", "GetStrengthPoints() FactionToCheck parameter unrecognized. Expected 1 or 2: got " + FactionToCheck) - return -1 - EndIf - -EndFunction - - -int Function ChooseAttackingFaction(int FactionToForce = 0) -{Returns an int representing a random faction to be the attacker in the next campaign, unless rules dictate the attacker should be forced to a particular faction.} - - int ChosenFaction = FactionToForce - - previousAttacker = attacker ;set the previous attacker - - log("CWScript", "ChooseAttackingFaction() FactionToForce =" +FactionToForce) - - ;if either factions owns all the contestable holds, force the attacker to the other faction - if FactionOwnsAll(iImperials) - ChosenFaction = iSons - log("CWScript", "Imperials own all, forcing attacker to be Sons") - - ElseIf FactionOwnsAll(iSons) - ChosenFaction = iImperials - log("CWScript", "Sons own all, forcing attacker to be Imperials") - - ;If either side has attacked more than the allowable # of attacks, force the other side - ElseIf ConsecutiveAttacks > CWMaxConsecutiveAttacks.value ;this is a global so we can more easily tweak this setting as we play - if PreviousAttacker == iImperials - ChosenFaction = iSons - Else ;Previous attacker was iSons - ChosenFaction = iImperials - EndIf - - ConsecutiveAttacks = 0 - log("CWScript", "ConsecutiveAttacks > CWMaxConsecutiveAttacks.value, forcing attacker to be " + FactionName(ChosenFaction)) - - ElseIf ChosenFaction == 0 ;we aren't forcing it - ChosenFaction = utility.RandomInt(1,2) ;1 = Imperials, 2 = Sons - EndIf - - if previousAttacker == ChosenFaction - consecutiveAttacks += 1 - EndIf - - log("CWScript", "ChooseAttackingFaction() is returning " + ChosenFaction + "(" + FactionName(ChosenFaction) + ")") - return ChosenFaction -EndFunction - - -int Function ValidateHoldToAttack(int Hold, int HoldOwner, int AttackingFaction, int AttackerStengthPoints) -{Sub function for ChooseHoldToAttack, returns an int with the failure code, or 0 if there is no failure } - ;VERIFY this is a valid Hold to attack. Otherwise, FAILURE: 1 = impossible to attack this hold (Haafingar/Eastmarch), 2 = Attacker already owns, 3 = Attacker owns no adjacent holds - ;Check for non-contestable holds - - int failure = 0 - - if (Hold == iHaafingar) || (Hold == iEastmarch) && CWDebugAllowCampaignsInFinalHolds.GetValue() == 0 - ;FAIL - failure = 1 - log("CWScript", "ChooseHoldToAttack tried to attack Haafingar or Eastmarch.") - - elseif AttackingFaction == HoldOwner - ;FAIL - failure = 2 - log("CWScript", "ChooseHoldToAttack tried to attack a hold already owned by the AttackingFaction.") - - elseif AttackerStengthPoints == 0 - ;FAIL - failure = 3 - log("CWScript", "ChooseHoldToAttack tried to attack a hold where attacking faction has no AttackPoints in hold (owns no adjacent holds).") - - Else - ;SUCCESS!! - log("CWScript", "ChooseHoldToAttack picked a valid hold to attack (" + HoldName(Hold) +").") - - EndIf - - return failure - - -EndFunction - -int Function ChooseHoldToAttack(int AttackingFaction, int HoldToForce = 0) -{Takes int AttackingFaction (1 = Imperials, 2 = Sons). It SETS various PROPERTIES and RETURNS an INT corresponding to the hold that should be attacked next. -1 == FAIL} - ;param int AttackingFaction Which faction is attacking? 1 = Imperials, 2 = Sons - ;param int HoldToForce Default = 0; sets Hold to this value - - bool FoundHold ;0 = keep trying, 1 = found a hold that passed the validity check, return HoldToAttack - int Hold ;1-9 = which hold to attack (if valid) - int HoldOwner ;who owns the hold? 1 = Imperials, 2 = Sons - int strImperials ;the strength points of the Imperials in the hold - int strSons ;the strength points of the Sons in the hold - int StrAtkr ;the strength points of the attacker - int strDfdr ;the strength points of the defender - - int failure ;1 = impossible to attack this hold (Haafingar/Eastmarch), 2 = Attacker already owns, 3 = Attacker owns no adjacent holds - - - int TriesLeftBeforeAllowingPreviousContestedHold = 5 ;try to pick something else, if nothing else is valid, go ahead and pick the same hold as last campaign, counts down multiple attempts before giving up - see "While FoundHold == 0" loop below - - ;set the previousContestedHold -- note is redundant. It is set in FinishCampaign() but setting it again shouldn't hurt. - previousContestedHold = contestedHold - - If HoldToForce > 0 - log("CWScript", "Running chooseHoldToAttack() with HoldToForce =" + HoldToForce + ". ") - Hold = HoldToForce - EndIf - - While FoundHold == 0 - - ;If we haven't rolled for a hold yet, roll a 9 sided die (for 9 holds to try) - if Hold == 0 - Hold = utility.randomInt(1,9) - - EndIf - - log("CWScript", "ChooseHoldToAttack Attacking faction =" + AttackingFaction + "(" + FactionName(AttackingFaction)+ ")") - - log("CWScript", "ChooseHoldToAttack chose hold # " + Hold + "(" + HoldName(Hold) +")") - - HoldOwner = GetHoldOwner(Hold) - - log("CWScript", "ChooseHoldToAttack HoldOwner =" + HoldOwner + "(" +FactionName(HoldOwner) + ")") - - strImperials = GetStrengthPoints(iImperials, Hold) - - log("CWScript", "ChooseHoldToAttack strImperials =" + strImperials) - - strSons = GetStrengthPoints(iSons, Hold) - - log("CWScript", "ChooseHoldToAttack strSons =" + strSons) - - ;Establish the attacker/defender strength points - if AttackingFaction == iImperials - strAtkr = strImperials - strDfdr = strSons - - elseif AttackingFaction == iSons - strAtkr = strSons - strDfdr = strImperials - - Else - log("CWScript", "ChooseHoldToAttack expecting 1 or 2 for AttackingFaction parameter. Got " + AttackingFaction + " this will break the civil war system.") - debug.MessageBox("ChooseHoldToAttack expecting 1 or 2 for AttackingFaction parameter. Got " + AttackingFaction + " this will break the civil war system.") - return -1 - EndIf - - ;VERIFY this is a valid Hold to attack. Otherwise, FAILURE: 1 = impossible to attack this hold (Haafingar/Eastmarch), 2 = Attacker already owns, 3 = Attacker owns no adjacent holds - failure = ValidateHoldToAttack(Hold, HoldOwner, AttackingFaction, strAtkr) - - if failure > 0 && !(failure == 3 && debugAllowNonAdjacentHolds == 1) ;if we have a failure that a debug variable isn't allowing - FoundHold = 0 - Hold = 0 - Failure = 0 - - log("CWScript", "ChooseHoldToAttack picked an invalid hold, re-rolling a new hold to try to attack.") - - elseif Hold == previousContestedHold && TriesLeftBeforeAllowingPreviousContestedHold > 0 - TriesLeftBeforeAllowingPreviousContestedHold -= 1 - FoundHold = 0 - Hold = 0 - - log("CWScript", "ChooseHoldToAttack picked the previously contested hold, re-rolling a new hold to try to attack. Tries left before allowing previous hold: " + TriesLeftBeforeAllowingPreviousContestedHold) - - else ;success - - if failure == 3 && debugAllowNonAdjacentHolds == 1 - log("CWScript", "ChooseHoldToAttack() Ignoring Adjacent Hold requirement and allowing the attack.", 1) - endif - - ;SET CWSCRIPT PROPERTIES - ContestedHold = Hold - OwnerContestedHold = HoldOwner - strContestedHoldImperial = strImperials - strContestedHoldSons = strSons - strAttacker = strAtkr - strDefender= strDfdr - - FoundHold = 1 - return hold - endif - - EndWhile - - -EndFunction - - -Function SetAttackDelta() -{Sets the attack delta based on current strAttacker and strDefender} - AttackDelta = strAttacker - strDefender - - log("CWScript", "AttackDelta (" + AttackDelta + " ) = StrAttack (" + StrAttacker + ") - StrDefender (" + StrDefender + ")") - - if Math.abs(AttackDelta) > MaxAttackDelta - if AttackDelta > 0 - AttackDelta = MaxAttackDelta - Else - AttackDelta = -MaxAttackDelta - endif - - log("CWScript", "|AttackDelta| is larger than MaxAttackDelta, constraining AttackDelta(" + AttackDelta + ") to MaxAttackDelta (" + MaxAttackDelta + ")") - EndIf - -EndFunction - - -Function startCampaignQuest(int Hold) -{Starts CWCampaign using CWCampaignStart.SendStoryEvent() with the corresponding Location of the ContestedHold} - location CampaignLocation = GetLocationForHold(Hold) - ObjectReference CampaignStartMarker = GetCampaignStartMarker(Hold) - - CWCampaignStart.SendStoryEvent(CampaignLocation,CampaignStartMarker) - - log("CWScript", "startCampaignQuest: CWCampainStart.SendStoryEvent(" + CampaignLocation + ", " + CampaignStartMarker+ ")") - - -EndFunction - -;OLD VERSION -;Function SetHoldOwner(int HoldToSet, int FactionToOwn) -;{Takes int HoldToSet and int FactionToOwn, and calls the appropriate setOwnerXXX(FactionToOwn) function} -; -; if HoldToSet == iHaafingar ;1 -; setOwnerHaafingar(FactionToOwn) -; -; elseif HoldToSet == iReach ; 2 -; setOwnerReach(FactionToOwn) -; -; elseif HoldToSet == iHjaalmarch ;3 -; setOwnerHjaalmarch(FactionToOwn) -; -; elseif HoldToSet == iWhiterun ;4 -; setOwnerWhiterun(FactionToOwn) -; -; elseif HoldToSet == iFalkreath ;5 -; setOwnerFalkreath(FactionToOwn) -; -; elseif HoldToSet == iPale ;6 -; setOwnerPale(FactionToOwn) -; -; elseif HoldToSet == iWinterhold ;7 -; setOwnerWinterhold(FactionToOwn) -; -; elseif HoldToSet == iEastmarch ;8 -; setOwnerEastmarch(FactionToOwn) -; -; elseif HoldToSet == iRift ;9 -; setOwnerRift(FactionToOwn) -; -; else -; log("CWScript", "SetHoldOwner(" + HoldToSet + ") parametered unrecognized. Expected an int 1-9 as HoldToCheck, got something else.") -; EndIf -; -;EndFunction - -function finishCampaign() -{Sets properties, and other campaign clean up duties... called by CWCampaign stage 255} - - ;set properties appropriately - CampaignRunning = 0 ;not running -- this used to happen in the CWCampaign shut down stage. It lives here so that we are sure the faction leader won't have dialogue talking about the campaign that is just finishing up - - CWCampaignS.completedMission = 0 ;clear out so Field CO doesn't say anything about a completed mission from previous campaign - CWCampaignS.failedMission = 0 ;clear out so Field CO doesn't say anything about a failed mission from previous campaign - - (CWCampaign as CWCampaignScript).stopTutorialMission() - - setContestedHoldWinType() - setCountWins() - previousContestedHold = contestedHold ;note this is also set in StartCampaign() but setting it again shouldn't hurt. It needs to go here so that Faction leader has something to say when you report in - - ;Show messages, objectives, and stop CampaignQuest - if debugForceOffscreenResult == 0 - - playerReport = 1 ;player needs to report to faction leader - - ;Show the campaign won message: - getCampaignWonMessage().show() - - if contestedHoldWinner == playerAllegiance - CWCampaignObj.setStage(20) ;objective: report success - else - CWCampaignObj.setStage(30) ;objective: report failure - endif - - EndIf - - ContributeToSalaryPool() - -;USES OLD COMMENTED OUT VERSION -; setHoldOwner(ContestedHold, ContestedHoldWinner) ;we should set objectives before this, but also this needs to be called before stopping the campaign so the new one doesn't try to start before it knows who the new owner is - - if debugForceOffscreenResult == 0 - log("CWScript", "CWCampaign: stopping quest, campaign finished.") - - CWCampaign.stop() - endif - - -EndFunction - - -Function SetGarrisonCost(Location LocToSet, int Cost) -{Takes Location LocToSet and sets its CWCost keyword data to Int Cost} - LocToSet.SetKeywordData(CWCost, Cost) - log("CWScript", "SetGarrisonCost() Location =" + LocToSet + ", Cost = " + Cost) - -EndFunction - -int Function GetGarrisonCost(Location LocToGetCost) - int cost = LocToGetCost.GetKeywordData(CWCost) as Int - log("CWScript", "GetGarrisonCost() Location =" + LocToGetCost + ", Cost = " + Cost) - return cost - -EndFunction - - -Function setInitialCosts() -{Called in the OnInit block, one time set up of initial Costs of all the locations.} - - ;Have to break this into sub functions to get around with a compiler bug with complex functions - setInitialGarrisonCostsHaafingar() - setInitialGarrisonCostsReach() - setInitialGarrisonCostsHjaalmarch() - setInitialGarrisonCostsWhiterun() - setInitialGarrisonCostsFalkreath() - setInitialGarrisonCostsPale() - setInitialGarrisonCostsWinterhold() - setInitialGarrisonCostsEastmarch() - setInitialGarrisonCostsRift() - -EndFunction - -;setInitialCosts() subfunctions -- to get around a function size bug in the compiler -Function setInitialGarrisonCostsHaafingar() - SetGarrisonCost(SolitudeLocation, iCostNonContestable) - SetGarrisonCost(SolitudeSawmillLocation, iCostNonContestable) - SetGarrisonCost(KatlasFarmLocation, iCostNonContestable) - SetGarrisonCost(DragonBridgeLocation, iCostNonContestable) - - SetGarrisonCost(FortHraggstadLocation, iCostNonContestable) -EndFunction - -Function setInitialGarrisonCostsReach() - SetGarrisonCost(MarkarthLocation, iCostNonContestable) - SetGarrisonCost(CidhnaMineLocation, iCostNonContestable) - SetGarrisonCost(LeftHandMineLocation, iCostNonContestable) - SetGarrisonCost(SalviusFarmLocation, iCostNonContestable) - SetGarrisonCost(KarthwastenLocation, iCostMedium) - SetGarrisonCost(OldHroldanLocation, iCostMedium) - SetGarrisonCost(KolskeggrMineLocation, iCostSmall) - - SetGarrisonCost(FortSungardLocation, iCostFort) -EndFunction - -Function setInitialGarrisonCostsHjaalmarch() - SetGarrisonCost(MorthalLocation, iCostNonContestable) - SetGarrisonCost(StonehillsLocation, iCostSmall) -; SetGarrisonCost(FrostRiverFarmLocation, iCostSmall) - - SetGarrisonCost(FortSnowhawkLocation, iCostFort) -EndFunction - -Function setInitialGarrisonCostsWhiterun() - SetGarrisonCost(WhiterunLocation, iCostNonContestable) - SetGarrisonCost(BattleBornFarmLocation, iCostNonContestable) - SetGarrisonCost(ChillfurrowFarmLocation, iCostNonContestable) - SetGarrisonCost(PelagiaFarmLocation, iCostNonContestable) - SetGarrisonCost(RoriksteadLocation, iCostMedium) - SetGarrisonCost(RiverwoodLocation, iCostSmall) -; SetGarrisonCost(BarleydarkFarmLocation, iCostSmall) - - SetGarrisonCost(FortGreymoorLocation, iCostFort) -EndFunction - -Function setInitialGarrisonCostsFalkreath() - SetGarrisonCost(FalkreathLocation, iCostNonContestable) -; SetGarrisonCost(GraniteHillLocation, iCostMedium) - SetGarrisonCost(HelgenLocation, iCostMedium) -; SetGarrisonCost(BearsCaveMillLocation, iCostSmall) - SetGarrisonCost(HalfmoonMillLocation, iCostSmall) - - SetGarrisonCost(FortNeugradLocation, iCostFort) -EndFunction - -Function setInitialGarrisonCostsPale() - SetGarrisonCost(DawnstarLocation, iCostNonContestable) -; SetGarrisonCost(HeljarchenLocation, iCostMedium) - SetGarrisonCost(AngasMillLocation, iCostSmall) - SetGarrisonCost(LoreiusFarmLocation, iCostSmall) - - SetGarrisonCost(FortDunstadLocation, iCostFort) -EndFunction - -Function setInitialGarrisonCostsWinterhold() - SetGarrisonCost(WinterholdLocation, iCostNonContestable) - SetGarrisonCost(WhistlingMineLocation, iCostSmall) - - SetGarrisonCost(FortKastavLocation, iCostFort) -EndFunction - -Function setInitialGarrisonCostsEastmarch() - SetGarrisonCost(WindhelmLocation, iCostNonContestable) - SetGarrisonCost(BrandyMugFarmLocation, iCostNonContestable) - SetGarrisonCost(HlaaluFarmLocation, iCostNonContestable) - SetGarrisonCost(HollyfrostFarmLocation, iCostNonContestable) - SetGarrisonCost(KynesgroveLocation, iCostNonContestable) - SetGarrisonCost(DarkwaterCrossingLocation, iCostNonContestable) - SetGarrisonCost(MixwaterMillLocation, iCostNonContestable) - - SetGarrisonCost(FortAmolLocation, iCostNonContestable) -EndFunction - -Function setInitialGarrisonCostsRift() - SetGarrisonCost(RiftenLocation, iCostNonContestable) - SetGarrisonCost(SnowShodFarmLocation, iCostNonContestable) - ;SetGarrisonCost(GoldenglowFarmLocation, iCostNonContestable) -- GoldenGlowFarm is NOT a normal location. It's quest specific area spawning it's own guards, and should not be part of the Civil War. - SetGarrisonCost(MerryfairFarmLocation, iCostNonContestable) - SetGarrisonCost(IvarsteadLocation, iCostMedium) - SetGarrisonCost(ShorsStoneLocation, iCostSmall) - SetGarrisonCost(HeartwoodMillLocation, iCostSmall) - SetGarrisonCost(SarethiFarmLocation, iCostSmall) - - SetGarrisonCost(FortGreenwallLocation, iCostFort) -EndFunction - -function registerMissionSuccess(Location HoldLocation, bool isFortBattle = False) - CountMissionSuccess += 1 - - log("CWScript", "registerMissionSuccess(HoldLocation:" + HoldLocation + ", isFortBattle:" + isFortBattle + ") CountMissionSuccess = " + CountMissionSuccess + ". Calling DisplayHoldObjective() if isFortBattle == false") - - ;NOTE: - ;If isFortBattle is true, then we should skip displaying the Hold Objective, UNLESS we decide put reimplement the final battles at the capitals - - if isFortBattle == False - DisplayHoldObjective() - EndIf - -EndFunction - -function SetContestedHoldWinType() -{Sets the ContestedHoldWinType variable} - - if ownerContestedHold == ContestedHoldWinner - contestedHoldWinType = 2 ;held onto it - log("CWScript", "SetContestedHoldWinType() set contestedHoldWinType to 2 (defender)") - - Else - contestedHoldWinType = 1 ;took it away from the enemy - log("CWScript", "SetContestedHoldWinType() set contestedHoldWinType to 1 (attacker))") - EndIf - -EndFunction - -Function resolveOffscreen(int CurrentAttackDelta = 0) -{Causes the campaign to resolve offscreen, puts this script in the ResolvingCampaignOffscreen state. When the CWCampaign calls this function, it needs to pass in the CurrentAttackValue. When this parameter is not present, it means we are resolving it in ForcedResolveOffscreen mode.} - - GoToState("ResolvingCampaignOffscreen") - - int winner ;1 = Imperials, 2 = Sons -- these are held in Attacker and Defender - - stopSiegeQuests() ;causes any running siege quest to stop - - if CurrentAttackDelta == 0 ; it means something other than the actual campaign is calling this function, most likely because we are running in a debugging "force offscreen resolution" mode where we aren't really going through all the campaign scripting - CurrentAttackDelta = AttackDelta ;because the campaign isn't calling this function passing in a CurrentAttackDelta, we will use the starting AttackDelta that the CW quest calculated when it picked a hold to contest - - log("CWScript", "resolveOffscreen() called without a CurrentAttackDelta parameter, therefore we are using the initial AttackDelta set by CWScript in StartNewCampaign(): " + CurrentAttackDelta) - - Else - log("CWScript", "resolveOffscreen() called with a CurrentAttackDelta parameter = " + CurrentAttackDelta) - - EndIf - - - ;Always calculate these values for troubleshooting purposes, even if we are going to force the defender to win below - resolutionForced = False - resolutionDieRoll = Utility.RandomInt(0, 100) - resolutionResult = resolutionDieRoll + (CurrentAttackDelta * ResolutionAttackDeltaMultiplier) - If resolutionResult > 50 - contestedHoldWinner = attacker - Else - contestedHoldWinner = defender - EndIf - - ;For major holds with cities, make sure the player involved flag has been set, otherwise force the winner to be the defender (this prevents a major hold changing hands if the player never got in olved) - If (ContestedHold == iReach && playerJoinedCampaginReach == 0) || (ContestedHold == iWhiterun && playerJoinedCampaginWhiterun == 0) || (ContestedHold == iRift && playerJoinedCampaginRift== 0) - contestedHoldWinner = defender - resolutionForced = True - EndIf - - log("CWScript", "resolveOffscreen() resolved with resolutionDieRoll =" + resolutionDieRoll + ", resolutionResult=" + resolutionResult + ", contestedHoldWinner =" + contestedHoldWinner + "(" + FactionName(contestedHoldWinner) + "), resolutionForced =" + resolutionForced + "; Now calling finishCampaign()") - - finishCampaign() - - log("CWScript", "resolveOffscreen() finished. Going to state WaitingToStartNewCampaign") - - GoToState("WaitingToStartNewCampaign") - - -EndFunction - - - diff --git a/source/scripts/cwsiegescript.psc b/source/scripts/cwsiegescript.psc deleted file mode 100644 index 1e97289d..00000000 --- a/source/scripts/cwsiegescript.psc +++ /dev/null @@ -1,1596 +0,0 @@ -Scriptname CWSiegeScript extends Quest Conditional -{Extends Quest} - -;******************* -;This script helps unify the Attack and Defend Quests for attacks and defenses of cities. -;It is essentially a collection of "arrays" of aliases and functions to setup/enable/reset/disable the references in those alisases in those "arrays" - -;"Arrays" holding aliases pointing to soldier references placed in the world -;ImperialAttackerX - these mimic an array called "ImperialAttackerAliases" - (the ones pointing at specific references in the world who have the link refs) -;ImperialDefenderX - these mimic an array called "ImperialDefenderAliases" - (the ones pointing at specific references in the world who have the link refs) -;SonsAttackerX - these mimic an array called "SonsAttackerAliases" - (the ones pointing at specific references in the world who have the link refs) -;SonsDefenderX - these mimic an array called "SonsDefenderAliases" - (the ones pointing at specific references in the world who have the link refs) - -;"Arrays" holding aliases that are used to put packages on the soldiers who are acting as Attackers or Defenders in this instance of the quest (in otherwords which of the above mentioned aliases are actually the attackers and defenders at this very moment) -;AttackerX - these mimic an array called "AttackerAliases" - (the ones with the packages and scripts to make the sieges work) -;DefenderX - these mimic an array called "DefenderAliases" - (the ones with the packages and scripts to make the sieges work) - -;Functions to call from quest stage fragment script: - -;RegisterXYZ() - this is how you pass aliases into the "array" -;DisableXYZ() - this is how you Disable all the references in aliases in the "array" -;EnableXYZ() - this is how you enable all the references in aliases in the "array" -;ResetXYZ() - this is how you Reset all the references in aliases in the "array" -; -;SetUpAliases(bool IsAttackQuest) - sets up, enables, and resets aliases as appropriate to the player faction and attacking Faction (it enables and resets all the generic and attacker/defender aliases, and GenericAttack or GenericDefend as appropriate to the TYPE of QUEST [IsAttackQuest] true = this is an attack on a city, false = this is a defense of a city) -;DisableAllAliases() - disables all the aliases registered into any of the "arrays" (strictly speaking it disables the generic aliases, and the Imperial/SonsAttacker/Defender aliases, not the Attacker/Defender aliases, but the Attacker/Defender aliases are just pointing at a subset of the Imperial/SonsAttacker/Defender aliases, so it amounts to the same thing) - - -;******************* - -CWScript Property CWs Auto - -GlobalVariable Property CWBattlePhase Auto - -GlobalVariable Property CWStateAttackerAtGate Auto -GlobalVariable Property CWStateAttackerBrokeThrough Auto -GlobalVariable Property CWStateAttackerLowReinforcements Auto -GlobalVariable Property CWStateAttackerOutOfReinforcements Auto -GlobalVariable Property CWStateAttackStarted Auto -GlobalVariable Property CWStateDefenderFallingBack Auto -GlobalVariable Property CWStateDefenderLastStand Auto -GlobalVariable Property CWStateDefenderLowReinforcements Auto -GlobalVariable Property CWStateDefenderOutOfReinforcements Auto - -bool Property DoneSettingUpAliases = False auto Hidden -bool Property DoneTurningOnAliases = False auto Hidden - -bool Property WasThisAnAttack Auto hidden -bool DisabledFastTravel = false - -bool Property AttackersHaveWon = false Auto Conditional -bool Property DefendersHaveWon = false Auto Conditional -Int Property CurrentCity Auto Conditional -{Gets set when CWSiege starts: -1 = Solitude -2 = Markarth -4 = Whiterun -8 = Windhelm -9 = Riften -} - -LocationAlias Property City Auto -LocationAlias Property Hold Auto - -;Pointers to references that handle the quest title text replacement -ObjectReference Property TextReplaceDEFENSE Auto -ObjectReference Property TextReplaceATTACK Auto -ReferenceAlias Property ObjAliasTextReplaceAttackDefend Auto - - -;sound control -MusicType Property MUSCombatCivilWar auto -sound Property AMBCombatSoundsLoop Auto -int CombatSoundsLoopInstance - -Weather Property WeatherWhiterun Auto -Weather Property WeatherMarkarth Auto -Weather Property WeatherRiften Auto -Weather Property WeatherSolitude Auto -Weather Property WeatherWindhelm Auto - -Explosion Property CWCatapultExp Auto - - -quest Property DA08 Auto - -Quest Property SolitudeOpening Auto - -Scene Property CWSiegeWhiterunDefendedScene Auto - -Quest Property CWPostWhiterunObj Auto ;objective turned on in stage 200 in CWSiege quest, and completed in CWSiegeJarlThankYouTopic fragment in CW quest - -MS11QuestScript Property MS11 Auto ;ised tp call a function on MS11 to help handle murder scene not occuring duing siege - -; ## External Aliases ## -Quest Property CWSiegeObj Auto -LocationAlias Property CWSiegeObjCity Auto -ReferenceAlias Property CWSiegeObjCityGate Auto -ReferenceAlias Property CWSiegeObjJarl Auto -ReferenceAlias Property CWSiegeObjGeneral Auto - -ReferenceAlias Property CWSiegeObjObjective1A Auto -ReferenceAlias Property CWSiegeObjObjective2A Auto -ReferenceAlias Property CWSiegeObjObjective3A Auto -ReferenceAlias Property CWSiegeObjObjective4A Auto - -ReferenceAlias Property CWSiegeObjObjective1B Auto -ReferenceAlias Property CWSiegeObjObjective2B Auto -ReferenceAlias Property CWSiegeObjObjective3B Auto -ReferenceAlias Property CWSiegeObjObjective4B Auto - -ReferenceAlias Property CWReservationsBalgruuf Auto -ReferenceAlias Property CWReservationsProventus Auto -ReferenceAlias Property CWReservationsIrileth Auto - -;"Array" of aliases -;rather than declaring these again on all siege scripts, we will create a function that the quest fragment can pass in the Alias_XXX aliases and put them in the "array" - -;Imperial Attacker/Defender aliases (the ones pointing at specific references in the world who have the link refs) -ReferenceAlias ImperialAttacker1 -ReferenceAlias ImperialAttacker2 -ReferenceAlias ImperialAttacker3 -ReferenceAlias ImperialAttacker4 -ReferenceAlias ImperialAttacker5 -ReferenceAlias ImperialAttacker6 -ReferenceAlias ImperialAttacker7 -ReferenceAlias ImperialAttacker8 -ReferenceAlias ImperialAttacker9 -ReferenceAlias ImperialAttacker10 - -ReferenceAlias ImperialDefender1 -ReferenceAlias ImperialDefender2 -ReferenceAlias ImperialDefender3 -ReferenceAlias ImperialDefender4 -ReferenceAlias ImperialDefender5 -ReferenceAlias ImperialDefender6 -ReferenceAlias ImperialDefender7 -ReferenceAlias ImperialDefender8 -ReferenceAlias ImperialDefender9 -ReferenceAlias ImperialDefender10 - -;Sons Attacker/Defender aliases (the ones pointing at specific references in the world who have the link refs) -ReferenceAlias SonsAttacker1 -ReferenceAlias SonsAttacker2 -ReferenceAlias SonsAttacker3 -ReferenceAlias SonsAttacker4 -ReferenceAlias SonsAttacker5 -ReferenceAlias SonsAttacker6 -ReferenceAlias SonsAttacker7 -ReferenceAlias SonsAttacker8 -ReferenceAlias SonsAttacker9 -ReferenceAlias SonsAttacker10 - -ReferenceAlias SonsDefender1 -ReferenceAlias SonsDefender2 -ReferenceAlias SonsDefender3 -ReferenceAlias SonsDefender4 -ReferenceAlias SonsDefender5 -ReferenceAlias SonsDefender6 -ReferenceAlias SonsDefender7 -ReferenceAlias SonsDefender8 -ReferenceAlias SonsDefender9 -ReferenceAlias SonsDefender10 - -;Attacker/Defender Aliases (the ones with the packages and scripts to make the sieges work, the above aliases will be shoved into these depending on who is attacking/defending) -ReferenceAlias Attacker1 -ReferenceAlias Attacker2 -ReferenceAlias Attacker3 -ReferenceAlias Attacker4 -ReferenceAlias Attacker5 -ReferenceAlias Attacker6 -ReferenceAlias Attacker7 -ReferenceAlias Attacker8 -ReferenceAlias Attacker9 -ReferenceAlias Attacker10 - -ReferenceAlias Defender1 -ReferenceAlias Defender2 -ReferenceAlias Defender3 -ReferenceAlias Defender4 -ReferenceAlias Defender5 -ReferenceAlias Defender6 -ReferenceAlias Defender7 -ReferenceAlias Defender8 -ReferenceAlias Defender9 -ReferenceAlias Defender10 - - -;Generic "array" of aliases of things we want to enable/reset/disable as a group (things like fires, catapolts, barricades, etc.) -ReferenceAlias Generic1 -ReferenceAlias Generic2 -ReferenceAlias Generic3 -ReferenceAlias Generic4 -ReferenceAlias Generic5 -ReferenceAlias Generic6 -ReferenceAlias Generic7 -ReferenceAlias Generic8 -ReferenceAlias Generic9 -ReferenceAlias Generic10 -ReferenceAlias Generic11 -ReferenceAlias Generic12 -ReferenceAlias Generic13 -ReferenceAlias Generic14 -ReferenceAlias Generic15 -ReferenceAlias Generic16 -ReferenceAlias Generic17 -ReferenceAlias Generic18 -ReferenceAlias Generic19 -ReferenceAlias Generic20 -ReferenceAlias Generic21 -ReferenceAlias Generic22 -ReferenceAlias Generic23 -ReferenceAlias Generic24 -ReferenceAlias Generic25 -ReferenceAlias Generic26 -ReferenceAlias Generic27 -ReferenceAlias Generic28 -ReferenceAlias Generic29 -ReferenceAlias Generic30 - - -;For ATTACK quests -Generic "array" of aliases of things we want to enable/reset/disable as a group (things like fires, catapolts, barricades, etc.) -ReferenceAlias GenericAttack1 -ReferenceAlias GenericAttack2 -ReferenceAlias GenericAttack3 -ReferenceAlias GenericAttack4 -ReferenceAlias GenericAttack5 -ReferenceAlias GenericAttack6 -ReferenceAlias GenericAttack7 -ReferenceAlias GenericAttack8 -ReferenceAlias GenericAttack9 -ReferenceAlias GenericAttack10 -ReferenceAlias GenericAttack11 -ReferenceAlias GenericAttack12 -ReferenceAlias GenericAttack13 -ReferenceAlias GenericAttack14 -ReferenceAlias GenericAttack15 -ReferenceAlias GenericAttack16 -ReferenceAlias GenericAttack17 -ReferenceAlias GenericAttack18 -ReferenceAlias GenericAttack19 -ReferenceAlias GenericAttack20 -ReferenceAlias GenericAttack21 -ReferenceAlias GenericAttack22 -ReferenceAlias GenericAttack23 -ReferenceAlias GenericAttack24 -ReferenceAlias GenericAttack25 -ReferenceAlias GenericAttack26 -ReferenceAlias GenericAttack27 -ReferenceAlias GenericAttack28 -ReferenceAlias GenericAttack29 -ReferenceAlias GenericAttack30 - -;For DEFEND quests -Generic "array" of aliases of things we want to enable/reset/disable as a group (things like fires, catapolts, barricades, etc.) -ReferenceAlias GenericDefend1 -ReferenceAlias GenericDefend2 -ReferenceAlias GenericDefend3 -ReferenceAlias GenericDefend4 -ReferenceAlias GenericDefend5 -ReferenceAlias GenericDefend6 -ReferenceAlias GenericDefend7 -ReferenceAlias GenericDefend8 -ReferenceAlias GenericDefend9 -ReferenceAlias GenericDefend10 -ReferenceAlias GenericDefend11 -ReferenceAlias GenericDefend12 -ReferenceAlias GenericDefend13 -ReferenceAlias GenericDefend14 -ReferenceAlias GenericDefend15 -ReferenceAlias GenericDefend16 -ReferenceAlias GenericDefend17 -ReferenceAlias GenericDefend18 -ReferenceAlias GenericDefend19 -ReferenceAlias GenericDefend20 -ReferenceAlias GenericDefend21 -ReferenceAlias GenericDefend22 -ReferenceAlias GenericDefend23 -ReferenceAlias GenericDefend24 -ReferenceAlias GenericDefend25 -ReferenceAlias GenericDefend26 -ReferenceAlias GenericDefend27 -ReferenceAlias GenericDefend28 -ReferenceAlias GenericDefend29 -ReferenceAlias GenericDefend30 - - -ReferenceAlias AttackerSonsCampMapMarker -Referencealias AttackerImperialCampMapMarker -ReferenceAlias MapMarkerToDisable1 -ReferenceAlias MapMarkerToDisable2 -ReferenceAlias MapMarkerToDisable3 -ReferenceAlias MapMarkerToDisable4 -ReferenceAlias MapMarkerToDisable5 -ReferenceAlias MapMarkerToDisable6 -ReferenceAlias MapMarkerToDisable7 -ReferenceAlias MapMarkerToDisable8 -ReferenceAlias MapMarkerToDisable9 -ReferenceAlias MapMarkerToDisable10 -ReferenceAlias MapMarkerToDisable11 -ReferenceAlias MapMarkerToDisable12 -ReferenceAlias MapMarkerToDisable13 -ReferenceAlias MapMarkerToDisable14 -ReferenceAlias MapMarkerToDisable15 -ReferenceAlias MapMarkerToDisable16 - -function RegisterMapMarkerAliases(ReferenceAlias AttackerSonsCampMapMarkerAlias, ReferenceAlias AttackerImperialCampMapMarkerAlias, \ -ReferenceAlias MapMarkerToDisable1Alias, \ -ReferenceAlias MapMarkerToDisable2Alias, \ -ReferenceAlias MapMarkerToDisable3Alias, \ -ReferenceAlias MapMarkerToDisable4Alias, \ -ReferenceAlias MapMarkerToDisable5Alias, \ -ReferenceAlias MapMarkerToDisable6Alias, \ -ReferenceAlias MapMarkerToDisable7Alias, \ -ReferenceAlias MapMarkerToDisable8Alias, \ -ReferenceAlias MapMarkerToDisable9Alias, \ -ReferenceAlias MapMarkerToDisable10Alias, \ -ReferenceAlias MapMarkerToDisable11Alias, \ -ReferenceAlias MapMarkerToDisable12Alias, \ -ReferenceAlias MapMarkerToDisable13Alias, \ -ReferenceAlias MapMarkerToDisable14Alias, \ -ReferenceAlias MapMarkerToDisable15Alias, \ -ReferenceAlias MapMarkerToDisable16Alias) - - AttackerSonsCampMapMarker = AttackerSonsCampMapMarkerAlias - AttackerImperialCampMapMarker = AttackerImperialCampMapMarkerAlias - MapMarkerToDisable1 = MapMarkerToDisable1Alias - MapMarkerToDisable2 = MapMarkerToDisable2Alias - MapMarkerToDisable3 = MapMarkerToDisable3Alias - MapMarkerToDisable4 = MapMarkerToDisable4Alias - MapMarkerToDisable5 = MapMarkerToDisable5Alias - MapMarkerToDisable6 = MapMarkerToDisable6Alias - MapMarkerToDisable7 = MapMarkerToDisable7Alias - MapMarkerToDisable8 = MapMarkerToDisable8Alias - MapMarkerToDisable9 = MapMarkerToDisable9Alias - MapMarkerToDisable10 = MapMarkerToDisable10Alias - MapMarkerToDisable11 = MapMarkerToDisable11Alias - MapMarkerToDisable12 = MapMarkerToDisable12Alias - MapMarkerToDisable13 = MapMarkerToDisable13Alias - MapMarkerToDisable14 = MapMarkerToDisable14Alias - MapMarkerToDisable15 = MapMarkerToDisable15Alias - MapMarkerToDisable16 = MapMarkerToDisable16Alias - -EndFunction - -function ToggleMapMarkersAndFastTravelStartBattle(bool isAttackQuest) - -; CWScript.Log("CWSiegeScript", self + "ToggleMapMarkersAndFastTravelStartBattle()") - - isAttackQuest = WasThisAnAttack ;added this late in the game (set in stage 0), easier to just do this than fix all instances that call this function and pass in a param - - - DisabledFastTravel = false ;clear it to be on the safe side - - if isAttackQuest - - if CWs.PlayerAllegiance == 1 - AttackerImperialCampMapMarker.TryToEnable() - elseif CWs.PlayerAllegiance == 2 - AttackerSonsCampMapMarker.TryToEnable() - endif - MapMarkerToDisable1.TryToDisable() - MapMarkerToDisable2.TryToDisable() - MapMarkerToDisable3.TryToDisable() - MapMarkerToDisable4.TryToDisable() - MapMarkerToDisable5.TryToDisable() - MapMarkerToDisable6.TryToDisable() - MapMarkerToDisable7.TryToDisable() - MapMarkerToDisable8.TryToDisable() - MapMarkerToDisable9.TryToDisable() - MapMarkerToDisable10.TryToDisable() - MapMarkerToDisable11.TryToDisable() - MapMarkerToDisable12.TryToDisable() - MapMarkerToDisable13.TryToDisable() - MapMarkerToDisable14.TryToDisable() - MapMarkerToDisable15.TryToDisable() - MapMarkerToDisable16.TryToDisable() - - Else -; CWScript.Log("CWSiegeScript", self + "DISABLING FAST TRAVEL!", 1, true, True) - Game.EnableFastTravel(false) - DisabledFastTravel = true - - - - EndIf - -EndFunction - -function ToggleMapMarkersAndFastTravelEndBattle(bool isAttackQuest) - -; CWScript.Log("CWSiegeScript", self + "ToggleMapMarkersAndFastTravelEndBattle()") - - isAttackQuest = WasThisAnAttack ;added this late in the game (set in stage 0), easier to just do this than fix all instances that call this function and pass in a param - - if isAttackQuest - - AttackerImperialCampMapMarker.TryToDisable() - AttackerSonsCampMapMarker.TryToDisable() - - MapMarkerToDisable1.TryToEnable() - MapMarkerToDisable2.TryToEnable() - MapMarkerToDisable3.TryToEnable() - MapMarkerToDisable4.TryToEnable() - MapMarkerToDisable5.TryToEnable() - MapMarkerToDisable6.TryToEnable() - MapMarkerToDisable7.TryToEnable() - MapMarkerToDisable8.TryToEnable() - MapMarkerToDisable9.TryToEnable() - MapMarkerToDisable10.TryToEnable() - MapMarkerToDisable11.TryToEnable() - MapMarkerToDisable12.TryToEnable() - MapMarkerToDisable13.TryToEnable() - MapMarkerToDisable14.TryToEnable() - MapMarkerToDisable15.TryToEnable() - MapMarkerToDisable16.TryToEnable() - - Else - - if DisabledFastTravel == true ;reminder why I am checking this: I need to check to make sure this quest actually disabled fast travel before turning it on again, because this might start/fail offscreen and I need to make sure I don't enable fast travel if the player didn't get involved -; CWScript.Log("CWSiegeScript", self + "ENABLING FAST TRAVEL!", 1, true, True) - Game.EnableFastTravel(true) - DisabledFastTravel = False - - - endif - - EndIf - -EndFunction - - -;Register functions essentially shove the aliases from the quest into arrays to be used more conveniently by other function calls - -;Register Imperial aliases -Function RegisterImperialAttackerAliases(ReferenceAlias RefAlias1, ReferenceAlias RefAlias2, ReferenceAlias RefAlias3, ReferenceAlias RefAlias4, ReferenceAlias RefAlias5, ReferenceAlias RefAlias6, ReferenceAlias RefAlias7, ReferenceAlias RefAlias8, ReferenceAlias RefAlias9, ReferenceAlias RefAlias10 ) -; CWScript.Log("CWSiegeScript", self + "calling RegisterImperialAttackerAliases()" + RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 ) - ImperialAttacker1 = RefAlias1 - ImperialAttacker2 = RefAlias2 - ImperialAttacker3 = RefAlias3 - ImperialAttacker4 = RefAlias4 - ImperialAttacker5 = RefAlias5 - ImperialAttacker6 = RefAlias6 - ImperialAttacker7 = RefAlias7 - ImperialAttacker8 = RefAlias8 - ImperialAttacker9 = RefAlias9 - ImperialAttacker10 = RefAlias10 - -EndFunction - -Function RegisterImperialDefenderAliases(ReferenceAlias RefAlias1, ReferenceAlias RefAlias2, ReferenceAlias RefAlias3, ReferenceAlias RefAlias4, ReferenceAlias RefAlias5, ReferenceAlias RefAlias6, ReferenceAlias RefAlias7, ReferenceAlias RefAlias8, ReferenceAlias RefAlias9, ReferenceAlias RefAlias10 ) -; CWScript.Log("CWSiegeScript", self + "calling RegisterImperialDefenderAliases()" + RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 ) - ImperialDefender1 = RefAlias1 - ImperialDefender2 = RefAlias2 - ImperialDefender3 = RefAlias3 - ImperialDefender4 = RefAlias4 - ImperialDefender5 = RefAlias5 - ImperialDefender6 = RefAlias6 - ImperialDefender7 = RefAlias7 - ImperialDefender8 = RefAlias8 - ImperialDefender9 = RefAlias9 - ImperialDefender10 = RefAlias10 - -EndFunction - -;Register Sons aliases -Function RegisterSonsAttackerAliases(ReferenceAlias RefAlias1, ReferenceAlias RefAlias2, ReferenceAlias RefAlias3, ReferenceAlias RefAlias4, ReferenceAlias RefAlias5, ReferenceAlias RefAlias6, ReferenceAlias RefAlias7, ReferenceAlias RefAlias8, ReferenceAlias RefAlias9, ReferenceAlias RefAlias10 ) -; CWScript.Log("CWSiegeScript", self + "calling RegisterSonsAttackerAliases()" + RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 ) - SonsAttacker1 = RefAlias1 - SonsAttacker2 = RefAlias2 - SonsAttacker3 = RefAlias3 - SonsAttacker4 = RefAlias4 - SonsAttacker5 = RefAlias5 - SonsAttacker6 = RefAlias6 - SonsAttacker7 = RefAlias7 - SonsAttacker8 = RefAlias8 - SonsAttacker9 = RefAlias9 - SonsAttacker10 = RefAlias10 - -EndFunction - -Function RegisterSonsDefenderAliases(ReferenceAlias RefAlias1, ReferenceAlias RefAlias2, ReferenceAlias RefAlias3, ReferenceAlias RefAlias4, ReferenceAlias RefAlias5, ReferenceAlias RefAlias6, ReferenceAlias RefAlias7, ReferenceAlias RefAlias8, ReferenceAlias RefAlias9, ReferenceAlias RefAlias10 ) -; CWScript.Log("CWSiegeScript", self + "calling RegisterSonsDefenderAliases()" + RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 ) - SonsDefender1 = RefAlias1 - SonsDefender2 = RefAlias2 - SonsDefender3 = RefAlias3 - SonsDefender4 = RefAlias4 - SonsDefender5 = RefAlias5 - SonsDefender6 = RefAlias6 - SonsDefender7 = RefAlias7 - SonsDefender8 = RefAlias8 - SonsDefender9 = RefAlias9 - SonsDefender10 = RefAlias10 - -EndFunction - -;Register Attacker Aliases -Function RegisterAttackerAliases(ReferenceAlias RefAlias1, ReferenceAlias RefAlias2, ReferenceAlias RefAlias3, ReferenceAlias RefAlias4, ReferenceAlias RefAlias5, ReferenceAlias RefAlias6, ReferenceAlias RefAlias7, ReferenceAlias RefAlias8, ReferenceAlias RefAlias9, ReferenceAlias RefAlias10 ) -; CWScript.Log("CWSiegeScript", self + "calling RegisterAttackerAliases()" + RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 ) - Attacker1 = RefAlias1 - Attacker2 = RefAlias2 - Attacker3 = RefAlias3 - Attacker4 = RefAlias4 - Attacker5 = RefAlias5 - Attacker6 = RefAlias6 - Attacker7 = RefAlias7 - Attacker8 = RefAlias8 - Attacker9 = RefAlias9 - Attacker10 = RefAlias10 - -EndFunction - -;Register Defender Aliases -Function RegisterDefenderAliases(ReferenceAlias RefAlias1, ReferenceAlias RefAlias2, ReferenceAlias RefAlias3, ReferenceAlias RefAlias4, ReferenceAlias RefAlias5, ReferenceAlias RefAlias6, ReferenceAlias RefAlias7, ReferenceAlias RefAlias8, ReferenceAlias RefAlias9, ReferenceAlias RefAlias10 ) -; CWScript.Log("CWSiegeScript", self + "calling RegisterDefenderAliases()" + RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 ) - Defender1 = RefAlias1 - Defender2 = RefAlias2 - Defender3 = RefAlias3 - Defender4 = RefAlias4 - Defender5 = RefAlias5 - Defender6 = RefAlias6 - Defender7 = RefAlias7 - Defender8 = RefAlias8 - Defender9 = RefAlias9 - Defender10 = RefAlias10 - -EndFunction - -;Register Generic Aliases -Function RegisterGenericAliases( \ -ReferenceAlias RefAlias1, ReferenceAlias RefAlias2 = None, ReferenceAlias RefAlias3 = None, ReferenceAlias RefAlias4 = None, ReferenceAlias RefAlias5 = None, ReferenceAlias RefAlias6 = None, ReferenceAlias RefAlias7 = None, ReferenceAlias RefAlias8 = None, ReferenceAlias RefAlias9 = None, ReferenceAlias RefAlias10 = None, \ -ReferenceAlias RefAlias11 = None, ReferenceAlias RefAlias12 = None, ReferenceAlias RefAlias13 = None, ReferenceAlias RefAlias14 = None, ReferenceAlias RefAlias15 = None, ReferenceAlias RefAlias16 = None, ReferenceAlias RefAlias17 = None, ReferenceAlias RefAlias18 = None, ReferenceAlias RefAlias19 = None, ReferenceAlias RefAlias20 = None, \ -ReferenceAlias RefAlias21 = None, ReferenceAlias RefAlias22 = None, ReferenceAlias RefAlias23 = None, ReferenceAlias RefAlias24 = None, ReferenceAlias RefAlias25 = None, ReferenceAlias RefAlias26 = None, ReferenceAlias RefAlias27 = None, ReferenceAlias RefAlias28 = None, ReferenceAlias RefAlias29 = None, ReferenceAlias RefAlias30 = None \ -) -; CWScript.Log("CWSiegeScript", self + "calling RegisterGenericAliases()" + \ -; RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 + "," + \ -; RefAlias11 + "," + RefAlias12 + "," + RefAlias13 + "," + RefAlias14 + "," + RefAlias15 + "," + RefAlias16 + "," + RefAlias17 + "," + RefAlias18 + "," + RefAlias19 + "," + RefAlias20 + "," + \ -; RefAlias21 + "," + RefAlias22 + "," + RefAlias23 + "," + RefAlias24 + "," + RefAlias25 + "," + RefAlias26 + "," + RefAlias27 + "," + RefAlias28 + "," + RefAlias29 + "," + RefAlias30 + "," \ -; ) - - Generic1 = RefAlias1 - Generic2 = RefAlias2 - Generic3 = RefAlias3 - Generic4 = RefAlias4 - Generic5 = RefAlias5 - Generic6 = RefAlias6 - Generic7 = RefAlias7 - Generic8 = RefAlias8 - Generic9 = RefAlias9 - Generic10 = RefAlias10 - - Generic11 = RefAlias11 - Generic12 = RefAlias12 - Generic13 = RefAlias13 - Generic14 = RefAlias14 - Generic15 = RefAlias15 - Generic16 = RefAlias16 - Generic17 = RefAlias17 - Generic18 = RefAlias18 - Generic19 = RefAlias19 - Generic20 = RefAlias20 - - Generic21 = RefAlias21 - Generic22 = RefAlias22 - Generic23 = RefAlias23 - Generic24 = RefAlias24 - Generic25 = RefAlias25 - Generic26 = RefAlias26 - Generic27 = RefAlias27 - Generic28 = RefAlias28 - Generic29 = RefAlias29 - Generic30 = RefAlias30 - - -EndFunction - -;Register GenericAttack Aliases -Function RegisterGenericAttackAliases( \ -ReferenceAlias RefAlias1, ReferenceAlias RefAlias2 = None, ReferenceAlias RefAlias3 = None, ReferenceAlias RefAlias4 = None, ReferenceAlias RefAlias5 = None, ReferenceAlias RefAlias6 = None, ReferenceAlias RefAlias7 = None, ReferenceAlias RefAlias8 = None, ReferenceAlias RefAlias9 = None, ReferenceAlias RefAlias10 = None, \ -ReferenceAlias RefAlias11 = None, ReferenceAlias RefAlias12 = None, ReferenceAlias RefAlias13 = None, ReferenceAlias RefAlias14 = None, ReferenceAlias RefAlias15 = None, ReferenceAlias RefAlias16 = None, ReferenceAlias RefAlias17 = None, ReferenceAlias RefAlias18 = None, ReferenceAlias RefAlias19 = None, ReferenceAlias RefAlias20 = None, \ -ReferenceAlias RefAlias21 = None, ReferenceAlias RefAlias22 = None, ReferenceAlias RefAlias23 = None, ReferenceAlias RefAlias24 = None, ReferenceAlias RefAlias25 = None, ReferenceAlias RefAlias26 = None, ReferenceAlias RefAlias27 = None, ReferenceAlias RefAlias28 = None, ReferenceAlias RefAlias29 = None, ReferenceAlias RefAlias30 = None \ -) -; CWScript.Log("CWSiegeScript", self + "calling RegisterGenericAttackAliases()" + \ -; RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 + "," + \ -; RefAlias11 + "," + RefAlias12 + "," + RefAlias13 + "," + RefAlias14 + "," + RefAlias15 + "," + RefAlias16 + "," + RefAlias17 + "," + RefAlias18 + "," + RefAlias19 + "," + RefAlias20 + "," + \ -; RefAlias21 + "," + RefAlias22 + "," + RefAlias23 + "," + RefAlias24 + "," + RefAlias25 + "," + RefAlias26 + "," + RefAlias27 + "," + RefAlias28 + "," + RefAlias29 + "," + RefAlias30 + "," \ -; ) - - GenericAttack1 = RefAlias1 - GenericAttack2 = RefAlias2 - GenericAttack3 = RefAlias3 - GenericAttack4 = RefAlias4 - GenericAttack5 = RefAlias5 - GenericAttack6 = RefAlias6 - GenericAttack7 = RefAlias7 - GenericAttack8 = RefAlias8 - GenericAttack9 = RefAlias9 - GenericAttack10 = RefAlias10 - - GenericAttack11 = RefAlias11 - GenericAttack12 = RefAlias12 - GenericAttack13 = RefAlias13 - GenericAttack14 = RefAlias14 - GenericAttack15 = RefAlias15 - GenericAttack16 = RefAlias16 - GenericAttack17 = RefAlias17 - GenericAttack18 = RefAlias18 - GenericAttack19 = RefAlias19 - GenericAttack20 = RefAlias20 - - GenericAttack21 = RefAlias21 - GenericAttack22 = RefAlias22 - GenericAttack23 = RefAlias23 - GenericAttack24 = RefAlias24 - GenericAttack25 = RefAlias25 - GenericAttack26 = RefAlias26 - GenericAttack27 = RefAlias27 - GenericAttack28 = RefAlias28 - GenericAttack29 = RefAlias29 - GenericAttack30 = RefAlias30 - -EndFunction - -;Register GenericDefend Aliases -Function RegisterGenericDefendAliases( \ -ReferenceAlias RefAlias1, ReferenceAlias RefAlias2 = None, ReferenceAlias RefAlias3 = None, ReferenceAlias RefAlias4 = None, ReferenceAlias RefAlias5 = None, ReferenceAlias RefAlias6 = None, ReferenceAlias RefAlias7 = None, ReferenceAlias RefAlias8 = None, ReferenceAlias RefAlias9 = None, ReferenceAlias RefAlias10 = None, \ -ReferenceAlias RefAlias11 = None, ReferenceAlias RefAlias12 = None, ReferenceAlias RefAlias13 = None, ReferenceAlias RefAlias14 = None, ReferenceAlias RefAlias15 = None, ReferenceAlias RefAlias16 = None, ReferenceAlias RefAlias17 = None, ReferenceAlias RefAlias18 = None, ReferenceAlias RefAlias19 = None, ReferenceAlias RefAlias20 = None, \ -ReferenceAlias RefAlias21 = None, ReferenceAlias RefAlias22 = None, ReferenceAlias RefAlias23 = None, ReferenceAlias RefAlias24 = None, ReferenceAlias RefAlias25 = None, ReferenceAlias RefAlias26 = None, ReferenceAlias RefAlias27 = None, ReferenceAlias RefAlias28 = None, ReferenceAlias RefAlias29 = None, ReferenceAlias RefAlias30 = None \ -) -; CWScript.Log("CWSiegeScript", self + "calling RegisterGenericDefendAliases()" + \ -; RefAlias1 + "," + RefAlias2 + "," + RefAlias3 + "," + RefAlias4 + "," + RefAlias5 + "," + RefAlias6 + "," + RefAlias7 + "," + RefAlias8 + "," + RefAlias9 + "," + RefAlias10 + "," + \ -; RefAlias11 + "," + RefAlias12 + "," + RefAlias13 + "," + RefAlias14 + "," + RefAlias15 + "," + RefAlias16 + "," + RefAlias17 + "," + RefAlias18 + "," + RefAlias19 + "," + RefAlias20 + "," + \ -; RefAlias21 + "," + RefAlias22 + "," + RefAlias23 + "," + RefAlias24 + "," + RefAlias25 + "," + RefAlias26 + "," + RefAlias27 + "," + RefAlias28 + "," + RefAlias29 + "," + RefAlias30 + "," \ -; ) - - GenericDefend1 = RefAlias1 - GenericDefend2 = RefAlias2 - GenericDefend3 = RefAlias3 - GenericDefend4 = RefAlias4 - GenericDefend5 = RefAlias5 - GenericDefend6 = RefAlias6 - GenericDefend7 = RefAlias7 - GenericDefend8 = RefAlias8 - GenericDefend9 = RefAlias9 - GenericDefend10 = RefAlias10 - - GenericDefend11 = RefAlias11 - GenericDefend12 = RefAlias12 - GenericDefend13 = RefAlias13 - GenericDefend14 = RefAlias14 - GenericDefend15 = RefAlias15 - GenericDefend16 = RefAlias16 - GenericDefend17 = RefAlias17 - GenericDefend18 = RefAlias18 - GenericDefend19 = RefAlias19 - GenericDefend20 = RefAlias20 - - GenericDefend21 = RefAlias21 - GenericDefend22 = RefAlias22 - GenericDefend23 = RefAlias23 - GenericDefend24 = RefAlias24 - GenericDefend25 = RefAlias25 - GenericDefend26 = RefAlias26 - GenericDefend27 = RefAlias27 - GenericDefend28 = RefAlias28 - GenericDefend29 = RefAlias29 - GenericDefend30 = RefAlias30 - -EndFunction - -Function RegisterAliasesWithCWReinforcementScript(Location SiegeLocationAttackPoint) -; CWScript.Log("CWSiegeScript", self + "calling RegisterAliasesWithCWReinforcementScript()") - - CWReinforcementControllerScript CWReinforcementControllerS = (self as quest ) as CWReinforcementControllerScript - - CWReinforcementControllerS.RegisterAttackPoint(SiegeLocationAttackPoint) - - CWReinforcementControllerS.RegisterAlias(Attacker1) - CWReinforcementControllerS.RegisterAlias(Attacker2) - CWReinforcementControllerS.RegisterAlias(Attacker3) - CWReinforcementControllerS.RegisterAlias(Attacker4) - CWReinforcementControllerS.RegisterAlias(Attacker5) - CWReinforcementControllerS.RegisterAlias(Attacker6) - CWReinforcementControllerS.RegisterAlias(Attacker7) - CWReinforcementControllerS.RegisterAlias(Attacker8) - CWReinforcementControllerS.RegisterAlias(Attacker9) - CWReinforcementControllerS.RegisterAlias(Attacker10) - - CWReinforcementControllerS.RegisterAlias(Defender1) - CWReinforcementControllerS.RegisterAlias(Defender2) - CWReinforcementControllerS.RegisterAlias(Defender3) - CWReinforcementControllerS.RegisterAlias(Defender4) - CWReinforcementControllerS.RegisterAlias(Defender5) - CWReinforcementControllerS.RegisterAlias(Defender6) - CWReinforcementControllerS.RegisterAlias(Defender7) - CWReinforcementControllerS.RegisterAlias(Defender8) - CWReinforcementControllerS.RegisterAlias(Defender9) - CWReinforcementControllerS.RegisterAlias(Defender10) - -EndFunction - -Function RegisterSpawnAttackerAliasesWithCWReinforcementScript(ReferenceAlias Marker1Alias, ReferenceAlias Marker2Alias, ReferenceAlias Marker3Alias, ReferenceAlias Marker4Alias, ReferenceAlias FailSafeMarkerAlias) - CWReinforcementControllerScript CWReinforcementControllerS = (self as quest ) as CWReinforcementControllerScript - -; CWScript.Log("CWSiegeScript", self + "RegisterSpawnAttackerAliasesWithCWReinforcementScript() calling RegisterSpawnAttackerAliases() on CWReinforcementControllerScript") - CWReinforcementControllerS.RegisterSpawnAttackerAliases(Marker1Alias, Marker2Alias, Marker3Alias, Marker4Alias, FailSafeMarkerAlias) - -EndFunction - -Function RegisterSpawnDefenderAliasesWithCWReinforcementScript(ReferenceAlias Marker1Alias, ReferenceAlias Marker2Alias, ReferenceAlias Marker3Alias, ReferenceAlias Marker4Alias, ReferenceAlias FailSafeMarkerAlias) - CWReinforcementControllerScript CWReinforcementControllerS = (self as quest ) as CWReinforcementControllerScript - -; CWScript.Log("CWSiegeScript", self + "RegisterSpawnDefenderAliasesWithCWReinforcementScript() calling RegisterSpawnDefenderAliases() on CWReinforcementControllerScript") - CWReinforcementControllerS.RegisterSpawnDefenderAliases(Marker1Alias, Marker2Alias, Marker3Alias, Marker4Alias, FailSafeMarkerAlias) - -EndFunction - -Function SetInfinitePoolsOnCWReinforcementScript() - CWReinforcementControllerScript CWReinforcementControllerS = (self as quest ) as CWReinforcementControllerScript - -; CWScript.Log("CWSiegeScript", self + "setInfinitePoolsOnCWReinforcementScript() calling SetInfinitePools() on CWReinforcementControllerScript") - CWReinforcementControllerS.SetInfinitePools() -EndFunction - - -Function SetPoolAttackerOnCWReinforcementScript(int BasePool, float AttackDeltaMult = 1.0, float scaleMult = 1.0, bool InfinitePool = False) - CWReinforcementControllerScript CWReinforcementControllerS = (self as quest ) as CWReinforcementControllerScript - -; CWScript.Log("CWSiegeScript", self + "SetPoolAttackerOnCWReinforcementScript() calling SetPoolAttacker() on CWReinforcementControllerScript") - CWReinforcementControllerS.SetPoolAttacker(BasePool, AttackDeltaMult, scaleMult, InfinitePool ) -EndFunction - -Function SetPoolDefenderOnCWReinforcementScript(int BasePool, float AttackDeltaMult = 1.0, float scaleMult = 1.0, bool InfinitePool = False) - CWReinforcementControllerScript CWReinforcementControllerS = (self as quest ) as CWReinforcementControllerScript - -; CWScript.Log("CWSiegeScript", self + "SetPoolDefenderOnCWReinforcementScript() calling SetPoolDefender() on CWReinforcementControllerScript") - CWReinforcementControllerS.SetPoolDefender(BasePool, AttackDeltaMult, scaleMult, InfinitePool ) -EndFunction - - -function DisableAllAliases() -; CWScript.Log("CWSiegeScript", self + "calling DisableAllAliases()") - DisableImperialSonsAliases() - DisableGenericAliases() - DisableGenericAttackAliases() - DisableGenericDefendAliases() - -EndFunction - -Function SetUpAliases(Location LocationOfSiege) - DoneSettingUpAliases = false - -; CWScript.Log("CWSiegeScript", self + "calling SetUpAliases()") - - DisableImperialSonsAliases() ;disables ALL the soldiers - SetUpAttackerDefenderAliases(LocationOfSiege) ;shoves soldiers into Attacker/Defender aliases depending on the player's faction and which faction is attacking - - LogAttackDefenderAliases() ;for debugging - - DoneSettingUpAliases = true - -EndFunction - -function TurnOnAliases(bool IsAttackQuest) - DoneTurningOnAliases = false - -; CWScript.Log("CWSiegeScript", self + "calling TurnOnAliases()") - - EnableAttackerDefenderAliases() ;Enables the Attacker/Defender aliases - ResetAttackerDefenderAliases() ;Resets the Attacker/Defender aliases - - EnableGenericAliases() ;Enables anything put into the Generic Alias "array" by RegisterGenericAliases() - ResetGenericAliases() ;Resets anything put into the Generic Alias "array" by RegisterGenericAliases() - - if IsAttackQuest - EnableGenericAttackAliases() ;Enables anything put into the Generic Attack Alias "array" by RegisterGenericAttackAliases() - ResetGenericAttackAliases() ;Resets anything put into the Generic Attack Alias "array" by RegisterGenericAttackAliases() - Else - EnableGenericDefendAliases() ;Enables anything put into the Generic Defend Alias "array" by RegisterGenericDefendAliases() - ResetGenericDefendAliases() ;Resets anything put into the Generic Defend Alias "array" by RegisterGenericDefendAliases() - EndIf - - DoneTurningOnAliases = true - -EndFunction - -Function LogAttackDefenderAliases() - logAlias(Attacker1) - logAlias(Attacker2) - logAlias(Attacker3) - logAlias(Attacker4) - logAlias(Attacker5) - logAlias(Attacker6) - logAlias(Attacker7) - logAlias(Attacker8) - logAlias(Attacker9) - logAlias(Attacker10) - - logAlias(Defender1) - logAlias(Defender2) - logAlias(Defender3) - logAlias(Defender4) - logAlias(Defender5) - logAlias(Defender6) - logAlias(Defender7) - logAlias(Defender8) - logAlias(Defender9) - logAlias(Defender10) - -EndFunction - -function logAlias(ReferenceAlias AliasToPrintToLog) -; CWScript.Log("CWSiegeScript", self + "logAlias()" + AliasToPrintToLog + " is REFERENCE " + AliasToPrintToLog.GetReference()) -EndFunction - -Function SetUpAttackerDefenderAliases(Location LocationOfSiege) - -; CWScript.Log("CWSiegeScript", self + "calling SetUpAttackerDefenderAliases()") - - if CWs.playerAllegiance == CWs.iImperials - if CWs.IsPlayerAttacking(LocationOfSiege) - SetUpAliasesImperialsAttacking() - - else ;playerAllegiance == Imperials, but Sons are attacking - SetUpAliasesSonsAttacking() - - endif - - Elseif CWs.playerAllegiance == 2 ;Sons - if CWs.IsPlayerAttacking(LocationOfSiege) - SetUpAliasesSonsAttacking() - - else ;playerAllegiance == Sons, but Imperials are attakcing - SetUpAliasesImperialsAttacking() - - endif - - Else ;unexpected player allegiance -; CWScript.Log("CWSiege", self + "WARNING: SetUpAliases() expected 1(Imperials) or 2(Sons) for CWs.PlayerAllegiance, got: " + CWs.PlayerAllegiance, 2) - - endif - -EndFunction - - -function SetUpAliasesImperialsAttacking() -; CWScript.Log("CWSiegeScript", self + "calling SetUpAliasesImperialsAttacking()") - Attacker1.ForceRefTo(ImperialAttacker1.GetReference()) - Attacker2.ForceRefTo(ImperialAttacker2.GetReference()) - Attacker3.ForceRefTo(ImperialAttacker3.GetReference()) - Attacker4.ForceRefTo(ImperialAttacker4.GetReference()) - Attacker5.ForceRefTo(ImperialAttacker5.GetReference()) - Attacker6.ForceRefTo(ImperialAttacker6.GetReference()) - Attacker7.ForceRefTo(ImperialAttacker7.GetReference()) - Attacker8.ForceRefTo(ImperialAttacker8.GetReference()) - Attacker9.ForceRefTo(ImperialAttacker9.GetReference()) - Attacker10.ForceRefTo(ImperialAttacker10.GetReference()) - - Defender1.ForceRefTo(SonsDefender1.GetReference()) - Defender2.ForceRefTo(SonsDefender2.GetReference()) - Defender3.ForceRefTo(SonsDefender3.GetReference()) - Defender4.ForceRefTo(SonsDefender4.GetReference()) - Defender5.ForceRefTo(SonsDefender5.GetReference()) - Defender6.ForceRefTo(SonsDefender6.GetReference()) - Defender7.ForceRefTo(SonsDefender7.GetReference()) - Defender8.ForceRefTo(SonsDefender8.GetReference()) - Defender9.ForceRefTo(SonsDefender9.GetReference()) - Defender10.ForceRefTo(SonsDefender10.GetReference()) -EndFunction - -function SetUpAliasesSonsAttacking() -; CWScript.Log("CWSiegeScript", self + "calling SetUpAliasesSonsAttacking()") - Attacker1.ForceRefTo(SonsAttacker1.GetReference()) - Attacker2.ForceRefTo(SonsAttacker2.GetReference()) - Attacker3.ForceRefTo(SonsAttacker3.GetReference()) - Attacker4.ForceRefTo(SonsAttacker4.GetReference()) - Attacker5.ForceRefTo(SonsAttacker5.GetReference()) - Attacker6.ForceRefTo(SonsAttacker6.GetReference()) - Attacker7.ForceRefTo(SonsAttacker7.GetReference()) - Attacker8.ForceRefTo(SonsAttacker8.GetReference()) - Attacker9.ForceRefTo(SonsAttacker9.GetReference()) - Attacker10.ForceRefTo(SonsAttacker10.GetReference()) - - Defender1.ForceRefTo(ImperialDefender1.GetReference()) - Defender2.ForceRefTo(ImperialDefender2.GetReference()) - Defender3.ForceRefTo(ImperialDefender3.GetReference()) - Defender4.ForceRefTo(ImperialDefender4.GetReference()) - Defender5.ForceRefTo(ImperialDefender5.GetReference()) - Defender6.ForceRefTo(ImperialDefender6.GetReference()) - Defender7.ForceRefTo(ImperialDefender7.GetReference()) - Defender8.ForceRefTo(ImperialDefender8.GetReference()) - Defender9.ForceRefTo(ImperialDefender9.GetReference()) - Defender10.ForceRefTo(ImperialDefender10.GetReference()) -EndFunction - -function tryToDisableAlias(ReferenceAlias AliasToTry) - ObjectReference AliasRef - - if AliasToTry - AliasRef = AliasToTry.GetReference() - - if AliasRef -; CWScript.Log("CWSiegeScript", self + "tryToDisableAlias([" + AliasToTry +"]) disabling: " + AliasRef) - AliasRef.Disable() - endif - - EndIf - -EndFunction - -function tryToEnableAlias(ReferenceAlias AliasToTry) - ObjectReference AliasRef - - if AliasToTry - AliasRef = AliasToTry.GetReference() - - if AliasRef -; CWScript.Log("CWSiegeScript", self + "tryToEnableAlias([" + AliasToTry +"]) enabling: " + AliasRef) - AliasRef.Enable() - endif - - EndIf - -EndFunction - -function tryToResetAlias(ReferenceAlias AliasToTry) - ObjectReference AliasRef - - if AliasToTry - AliasRef = AliasToTry.GetReference() - - if AliasRef -; CWScript.Log("CWSiegeScript", self + "tryToResetAlias([" + AliasToTry +"]) reseting: " + AliasRef) - AliasRef.Reset() - endif - - EndIf - -EndFunction - - -Function DisableImperialSonsAliases() -; CWScript.Log("CWSiegeScript", self + "calling DisableImperialSonsAliases()") - tryToDisableAlias(ImperialAttacker1) - tryToDisableAlias(ImperialAttacker2) - tryToDisableAlias(ImperialAttacker3) - tryToDisableAlias(ImperialAttacker4) - tryToDisableAlias(ImperialAttacker5) - tryToDisableAlias(ImperialAttacker6) - tryToDisableAlias(ImperialAttacker7) - tryToDisableAlias(ImperialAttacker8) - tryToDisableAlias(ImperialAttacker9) - tryToDisableAlias(ImperialAttacker10) - - tryToDisableAlias(ImperialDefender1) - tryToDisableAlias(ImperialDefender2) - tryToDisableAlias(ImperialDefender3) - tryToDisableAlias(ImperialDefender4) - tryToDisableAlias(ImperialDefender5) - tryToDisableAlias(ImperialDefender6) - tryToDisableAlias(ImperialDefender7) - tryToDisableAlias(ImperialDefender8) - tryToDisableAlias(ImperialDefender9) - tryToDisableAlias(ImperialDefender10) - - tryToDisableAlias(SonsAttacker1) - tryToDisableAlias(SonsAttacker2) - tryToDisableAlias(SonsAttacker3) - tryToDisableAlias(SonsAttacker4) - tryToDisableAlias(SonsAttacker5) - tryToDisableAlias(SonsAttacker6) - tryToDisableAlias(SonsAttacker7) - tryToDisableAlias(SonsAttacker8) - tryToDisableAlias(SonsAttacker9) - tryToDisableAlias(SonsAttacker10) - - tryToDisableAlias(SonsDefender1) - tryToDisableAlias(SonsDefender2) - tryToDisableAlias(SonsDefender3) - tryToDisableAlias(SonsDefender4) - tryToDisableAlias(SonsDefender5) - tryToDisableAlias(SonsDefender6) - tryToDisableAlias(SonsDefender7) - tryToDisableAlias(SonsDefender8) - tryToDisableAlias(SonsDefender9) - tryToDisableAlias(SonsDefender10) - -EndFunction - - -function EnableAttackerDefenderAliases() -; CWScript.Log("CWSiegeScript", self + "calling EnableAttackerDefenderAliases()") - - TryToEnableAlias(Attacker1) - TryToEnableAlias(Attacker2) - TryToEnableAlias(Attacker3) - TryToEnableAlias(Attacker4) - TryToEnableAlias(Attacker5) - TryToEnableAlias(Attacker6) - TryToEnableAlias(Attacker7) - TryToEnableAlias(Attacker8) - TryToEnableAlias(Attacker9) - TryToEnableAlias(Attacker10) - - TryToEnableAlias(Defender1) - TryToEnableAlias(Defender2) - TryToEnableAlias(Defender3) - TryToEnableAlias(Defender4) - TryToEnableAlias(Defender5) - TryToEnableAlias(Defender6) - TryToEnableAlias(Defender7) - TryToEnableAlias(Defender8) - TryToEnableAlias(Defender9) - TryToEnableAlias(Defender10) - -EndFunction - -Function ResetAttackerDefenderAliases() -; CWScript.Log("CWSiegeScript", self + "calling ResetAttackerDefenderAliases()") - - TryToResetAlias(Attacker1) - TryToResetAlias(Attacker2) - TryToResetAlias(Attacker3) - TryToResetAlias(Attacker4) - TryToResetAlias(Attacker5) - TryToResetAlias(Attacker6) - TryToResetAlias(Attacker7) - TryToResetAlias(Attacker8) - TryToResetAlias(Attacker9) - TryToResetAlias(Attacker10) - - TryToResetAlias(Defender1) - TryToResetAlias(Defender2) - TryToResetAlias(Defender3) - TryToResetAlias(Defender4) - TryToResetAlias(Defender5) - TryToResetAlias(Defender6) - TryToResetAlias(Defender7) - TryToResetAlias(Defender8) - TryToResetAlias(Defender9) - TryToResetAlias(Defender10) - -EndFunction - -;Functions to manipulate Generic Aliases "Array" -Function DisableGenericAliases() -; CWScript.Log("CWSiegeScript", self + "calling DisableGenericAliases()") - - TryToDisableAlias(Generic1) - TryToDisableAlias(Generic2) - TryToDisableAlias(Generic3) - TryToDisableAlias(Generic4) - TryToDisableAlias(Generic5) - TryToDisableAlias(Generic6) - TryToDisableAlias(Generic7) - TryToDisableAlias(Generic8) - TryToDisableAlias(Generic9) - TryToDisableAlias(Generic10) - - TryToDisableAlias(Generic11) - TryToDisableAlias(Generic12) - TryToDisableAlias(Generic13) - TryToDisableAlias(Generic14) - TryToDisableAlias(Generic15) - TryToDisableAlias(Generic16) - TryToDisableAlias(Generic17) - TryToDisableAlias(Generic18) - TryToDisableAlias(Generic19) - TryToDisableAlias(Generic20) - - TryToDisableAlias(Generic21) - TryToDisableAlias(Generic22) - TryToDisableAlias(Generic23) - TryToDisableAlias(Generic24) - TryToDisableAlias(Generic25) - TryToDisableAlias(Generic26) - TryToDisableAlias(Generic27) - TryToDisableAlias(Generic28) - TryToDisableAlias(Generic29) - TryToDisableAlias(Generic30) - -EndFunction - -Function EnableGenericAliases() -; CWScript.Log("CWSiegeScript", self + "calling EnableGenericAliases()") - - TryToEnableAlias(Generic1) - TryToEnableAlias(Generic2) - TryToEnableAlias(Generic3) - TryToEnableAlias(Generic4) - TryToEnableAlias(Generic5) - TryToEnableAlias(Generic6) - TryToEnableAlias(Generic7) - TryToEnableAlias(Generic8) - TryToEnableAlias(Generic9) - TryToEnableAlias(Generic10) - - TryToEnableAlias(Generic11) - TryToEnableAlias(Generic12) - TryToEnableAlias(Generic13) - TryToEnableAlias(Generic14) - TryToEnableAlias(Generic15) - TryToEnableAlias(Generic16) - TryToEnableAlias(Generic17) - TryToEnableAlias(Generic18) - TryToEnableAlias(Generic19) - TryToEnableAlias(Generic20) - - TryToEnableAlias(Generic21) - TryToEnableAlias(Generic22) - TryToEnableAlias(Generic23) - TryToEnableAlias(Generic24) - TryToEnableAlias(Generic25) - TryToEnableAlias(Generic26) - TryToEnableAlias(Generic27) - TryToEnableAlias(Generic28) - TryToEnableAlias(Generic29) - TryToEnableAlias(Generic30) - - - -EndFunction - -Function ResetGenericAliases() -; CWScript.Log("CWSiegeScript", self + "calling ResetGenericAliases()") - - TryToResetAlias(Generic1) - TryToResetAlias(Generic2) - TryToResetAlias(Generic3) - TryToResetAlias(Generic4) - TryToResetAlias(Generic5) - TryToResetAlias(Generic6) - TryToResetAlias(Generic7) - TryToResetAlias(Generic8) - TryToResetAlias(Generic9) - TryToResetAlias(Generic10) - - TryToResetAlias(Generic11) - TryToResetAlias(Generic12) - TryToResetAlias(Generic13) - TryToResetAlias(Generic14) - TryToResetAlias(Generic15) - TryToResetAlias(Generic16) - TryToResetAlias(Generic17) - TryToResetAlias(Generic18) - TryToResetAlias(Generic19) - TryToResetAlias(Generic20) - - TryToResetAlias(Generic21) - TryToResetAlias(Generic22) - TryToResetAlias(Generic23) - TryToResetAlias(Generic24) - TryToResetAlias(Generic25) - TryToResetAlias(Generic26) - TryToResetAlias(Generic27) - TryToResetAlias(Generic28) - TryToResetAlias(Generic29) - TryToResetAlias(Generic30) - -EndFunction - - -;Functions to manipulate GenericAttack Aliases "Array" -Function DisableGenericAttackAliases() -; CWScript.Log("CWSiegeScript", self + "calling DisableGenericAttackAliases()") - - TryToDisableAlias(GenericAttack1) - TryToDisableAlias(GenericAttack2) - TryToDisableAlias(GenericAttack3) - TryToDisableAlias(GenericAttack4) - TryToDisableAlias(GenericAttack5) - TryToDisableAlias(GenericAttack6) - TryToDisableAlias(GenericAttack7) - TryToDisableAlias(GenericAttack8) - TryToDisableAlias(GenericAttack9) - TryToDisableAlias(GenericAttack10) - - TryToDisableAlias(GenericAttack11) - TryToDisableAlias(GenericAttack12) - TryToDisableAlias(GenericAttack13) - TryToDisableAlias(GenericAttack14) - TryToDisableAlias(GenericAttack15) - TryToDisableAlias(GenericAttack16) - TryToDisableAlias(GenericAttack17) - TryToDisableAlias(GenericAttack18) - TryToDisableAlias(GenericAttack19) - TryToDisableAlias(GenericAttack20) - - TryToDisableAlias(GenericAttack21) - TryToDisableAlias(GenericAttack22) - TryToDisableAlias(GenericAttack23) - TryToDisableAlias(GenericAttack24) - TryToDisableAlias(GenericAttack25) - TryToDisableAlias(GenericAttack26) - TryToDisableAlias(GenericAttack27) - TryToDisableAlias(GenericAttack28) - TryToDisableAlias(GenericAttack29) - TryToDisableAlias(GenericAttack30) - -EndFunction - -Function EnableGenericAttackAliases() -; CWScript.Log("CWSiegeScript", self + "calling EnableGenericAttackAliases()") - - TryToEnableAlias(GenericAttack1) - TryToEnableAlias(GenericAttack2) - TryToEnableAlias(GenericAttack3) - TryToEnableAlias(GenericAttack4) - TryToEnableAlias(GenericAttack5) - TryToEnableAlias(GenericAttack6) - TryToEnableAlias(GenericAttack7) - TryToEnableAlias(GenericAttack8) - TryToEnableAlias(GenericAttack9) - TryToEnableAlias(GenericAttack10) - - TryToEnableAlias(GenericAttack11) - TryToEnableAlias(GenericAttack12) - TryToEnableAlias(GenericAttack13) - TryToEnableAlias(GenericAttack14) - TryToEnableAlias(GenericAttack15) - TryToEnableAlias(GenericAttack16) - TryToEnableAlias(GenericAttack17) - TryToEnableAlias(GenericAttack18) - TryToEnableAlias(GenericAttack19) - TryToEnableAlias(GenericAttack20) - - TryToEnableAlias(GenericAttack21) - TryToEnableAlias(GenericAttack22) - TryToEnableAlias(GenericAttack23) - TryToEnableAlias(GenericAttack24) - TryToEnableAlias(GenericAttack25) - TryToEnableAlias(GenericAttack26) - TryToEnableAlias(GenericAttack27) - TryToEnableAlias(GenericAttack28) - TryToEnableAlias(GenericAttack29) - TryToEnableAlias(GenericAttack30) - - - -EndFunction - -Function ResetGenericAttackAliases() -; CWScript.Log("CWSiegeScript", self + "calling ResetGenericAttackAliases()") - - TryToResetAlias(GenericAttack1) - TryToResetAlias(GenericAttack2) - TryToResetAlias(GenericAttack3) - TryToResetAlias(GenericAttack4) - TryToResetAlias(GenericAttack5) - TryToResetAlias(GenericAttack6) - TryToResetAlias(GenericAttack7) - TryToResetAlias(GenericAttack8) - TryToResetAlias(GenericAttack9) - TryToResetAlias(GenericAttack10) - - TryToResetAlias(GenericAttack11) - TryToResetAlias(GenericAttack12) - TryToResetAlias(GenericAttack13) - TryToResetAlias(GenericAttack14) - TryToResetAlias(GenericAttack15) - TryToResetAlias(GenericAttack16) - TryToResetAlias(GenericAttack17) - TryToResetAlias(GenericAttack18) - TryToResetAlias(GenericAttack19) - TryToResetAlias(GenericAttack20) - - TryToResetAlias(GenericAttack21) - TryToResetAlias(GenericAttack22) - TryToResetAlias(GenericAttack23) - TryToResetAlias(GenericAttack24) - TryToResetAlias(GenericAttack25) - TryToResetAlias(GenericAttack26) - TryToResetAlias(GenericAttack27) - TryToResetAlias(GenericAttack28) - TryToResetAlias(GenericAttack29) - TryToResetAlias(GenericAttack30) - -EndFunction - -;Functions to manipulate GenericDefend Aliases "Array" -Function DisableGenericDefendAliases() -; CWScript.Log("CWSiegeScript", self + "calling DisableGenericDefendAliases()") - - TryToDisableAlias(GenericDefend1) - TryToDisableAlias(GenericDefend2) - TryToDisableAlias(GenericDefend3) - TryToDisableAlias(GenericDefend4) - TryToDisableAlias(GenericDefend5) - TryToDisableAlias(GenericDefend6) - TryToDisableAlias(GenericDefend7) - TryToDisableAlias(GenericDefend8) - TryToDisableAlias(GenericDefend9) - TryToDisableAlias(GenericDefend10) - - TryToDisableAlias(GenericDefend11) - TryToDisableAlias(GenericDefend12) - TryToDisableAlias(GenericDefend13) - TryToDisableAlias(GenericDefend14) - TryToDisableAlias(GenericDefend15) - TryToDisableAlias(GenericDefend16) - TryToDisableAlias(GenericDefend17) - TryToDisableAlias(GenericDefend18) - TryToDisableAlias(GenericDefend19) - TryToDisableAlias(GenericDefend20) - - TryToDisableAlias(GenericDefend21) - TryToDisableAlias(GenericDefend22) - TryToDisableAlias(GenericDefend23) - TryToDisableAlias(GenericDefend24) - TryToDisableAlias(GenericDefend25) - TryToDisableAlias(GenericDefend26) - TryToDisableAlias(GenericDefend27) - TryToDisableAlias(GenericDefend28) - TryToDisableAlias(GenericDefend29) - TryToDisableAlias(GenericDefend30) - -EndFunction - -Function EnableGenericDefendAliases() -; CWScript.Log("CWSiegeScript", self + "calling EnableGenericDefendAliases()") - - TryToEnableAlias(GenericDefend1) - TryToEnableAlias(GenericDefend2) - TryToEnableAlias(GenericDefend3) - TryToEnableAlias(GenericDefend4) - TryToEnableAlias(GenericDefend5) - TryToEnableAlias(GenericDefend6) - TryToEnableAlias(GenericDefend7) - TryToEnableAlias(GenericDefend8) - TryToEnableAlias(GenericDefend9) - TryToEnableAlias(GenericDefend10) - - TryToEnableAlias(GenericDefend11) - TryToEnableAlias(GenericDefend12) - TryToEnableAlias(GenericDefend13) - TryToEnableAlias(GenericDefend14) - TryToEnableAlias(GenericDefend15) - TryToEnableAlias(GenericDefend16) - TryToEnableAlias(GenericDefend17) - TryToEnableAlias(GenericDefend18) - TryToEnableAlias(GenericDefend19) - TryToEnableAlias(GenericDefend20) - - TryToEnableAlias(GenericDefend21) - TryToEnableAlias(GenericDefend22) - TryToEnableAlias(GenericDefend23) - TryToEnableAlias(GenericDefend24) - TryToEnableAlias(GenericDefend25) - TryToEnableAlias(GenericDefend26) - TryToEnableAlias(GenericDefend27) - TryToEnableAlias(GenericDefend28) - TryToEnableAlias(GenericDefend29) - TryToEnableAlias(GenericDefend30) - - - -EndFunction - -Function ResetGenericDefendAliases() -; CWScript.Log("CWSiegeScript", self + "calling ResetGenericDefendAliases()") - - TryToResetAlias(GenericDefend1) - TryToResetAlias(GenericDefend2) - TryToResetAlias(GenericDefend3) - TryToResetAlias(GenericDefend4) - TryToResetAlias(GenericDefend5) - TryToResetAlias(GenericDefend6) - TryToResetAlias(GenericDefend7) - TryToResetAlias(GenericDefend8) - TryToResetAlias(GenericDefend9) - TryToResetAlias(GenericDefend10) - - TryToResetAlias(GenericDefend11) - TryToResetAlias(GenericDefend12) - TryToResetAlias(GenericDefend13) - TryToResetAlias(GenericDefend14) - TryToResetAlias(GenericDefend15) - TryToResetAlias(GenericDefend16) - TryToResetAlias(GenericDefend17) - TryToResetAlias(GenericDefend18) - TryToResetAlias(GenericDefend19) - TryToResetAlias(GenericDefend20) - - TryToResetAlias(GenericDefend21) - TryToResetAlias(GenericDefend22) - TryToResetAlias(GenericDefend23) - TryToResetAlias(GenericDefend24) - TryToResetAlias(GenericDefend25) - TryToResetAlias(GenericDefend26) - TryToResetAlias(GenericDefend27) - TryToResetAlias(GenericDefend28) - TryToResetAlias(GenericDefend29) - TryToResetAlias(GenericDefend30) - -EndFunction - - -function FailAttackQuest(locationAlias CityAlias) -; CWScript.Log("CWSiegeScript", self + "FailAttackQuest()") - - ;fail the siege quest: - CWs.CWSiegeObj.setStage(8999) - - CWs.FailCWObj(Hold.GetLocation()) - - ;fail the campaign - ;CWs.CWCampaignS.FailedMission = 1 - - CWs.ContestedHoldWinner = CWs.GetDefender(CityAlias.GetLocation()) - - ;CWs.CWCampaign.setStage(255) - - while Game.GetPlayer().IsInLocation(CityAlias.GetLocation()) -; CWScript.Log("CWSiegeScript", self + "FailAttackQuest() Waiting for player to leave City before stoping Siege quest") - utility.wait(5) - endwhile - stop() - -EndFunction - -function FailDefenseQuest(locationAlias CityAlias) -; CWScript.Log("CWSiegeScript", self + "FailDefenseQuest()") - - ;start the escape through the city quest -; CWScript.Log("CWSiegeScript", self + "FailDefenseQuest() CWs.CWEscapeCityStart.SendStoryEvent(" + CityAlias.GetLocation() +")") - CWs.CWEscapeCityStart.SendStoryEvent(CityAlias.GetLocation(), CWs.GetRikkeOrGalmar()) - - -; CWScript.Log("CWSiegeScript", self + "FailDefenseQuest() failing CWSiegeDefendObj quest and failing the campaign") - - ;fail the siege quest: - CWs.CWSiegeObj.setStage(8999) - - CWs.FailCWObj(Hold.GetLocation()) - - - ;Update the campaign objectives - ;CWs.CWCampaignObj.setStage(50) ;objective to flee the city with the Jarl - - ;Fail the campaign - ;CWs.CWCampaignS.FailedMission = 1 - - CWs.ContestedHoldWinner = CWs.GetAttacker(CityAlias.GetLocation()) - - ;CWs.CWCampaign.setstage(255) - - while Game.GetPlayer().IsInLocation(CityAlias.GetLocation()) -; CWScript.Log("CWSiegeScript", self + "FailDefenseQuest() Waiting for player to leave City before stoping Siege quest") - utility.wait(5) - endwhile - stop() - -EndFunction - -Function SucceedDefenseQuest(LocationAlias HoldAlias, LocationAlias CityAlias, ReferenceAlias MainGateExteriorAlias) -;SUCCESS!!! Defenders Win because attackers ran out of respawns -; CWScript.Log("CWSiegeScript", self + "SucceedDefenseQuest()") - -;Removes this music from the stack -MUSCombatCivilWar.Remove() - -;Prevent player activation of main gate into city -MainGateExteriorAlias.GetReference().BlockActivation(FALSE) - -;Set Global Dialog Stuff -CWs.CWStateAttackStarted.SetValue(0) -CWs.CWStateAttackerBrokeThrough.SetValue(0) -CWs.CWStateDefenderFallingBack.SetValue(0) -CWs.CWStateDefenderLastStand.SetValue(0) -CWs.CWStateAttackerAtGate.SetValue(0) -CWs.CWStateAttackerOutOfReinforcements.SetValue(1) - -CWs.CWSiegeObj.setStage(9000) - -;obsolete: -CWs.CompleteCWObj(Hold.GetLocation()) - -CWs.ContestedHoldWinner = CWs.GetDefender(CityAlias.GetLocation()) - -;CWs.registerMissionSuccess() - NOT counting final sieges as successful missions, since those are what increase the CWObj global values - -;CWs.CWCampaign.setStage(255) -- OBSOLETE - -while Game.GetPlayer().IsInLocation(CityAlias.GetLocation()) -; CWScript.Log("CWSiegeScript", self + "SucceedDefenseQuest(): Waiting for player to leave City before stoping Siege quest") - utility.wait(5) -endwhile -stop() - - -EndFunction - - -function TryToTurnOnCatapultAlias(ReferenceAlias CatapultAlias) - ObjectReference CatapultRef = CatapultAlias.GetReference() - - If CatapultRef -; CWScript.Log("CWSiegeScript", self + "TryToTurnOnCatapultAlias() calling turnOn() on " + CatapultRef) - (CatapultRef as CWCatapultScript).turnOn() - Else -; CWScript.Log("CWSiegeScript", self + "TryToTurnOnCatapultAlias() is empty alias, not turning on:" + CatapultAlias) - EndIf - -endfunction - -function TryToturnOffCatapultAlias(ReferenceAlias CatapultAlias) - ObjectReference CatapultRef = CatapultAlias.GetReference() - - If CatapultRef -; CWScript.Log("CWSiegeScript", self + "TryToturnOffCatapultAlias() calling turnOff() on " + CatapultRef) - (CatapultRef as CWCatapultScript).turnOff() - Else -; CWScript.Log("CWSiegeScript", self + "TryToturnOffCatapultAlias() is empty alias, not turning off:" + CatapultAlias) - EndIf - -endfunction - -bool function IsAttack() -; CWScript.Log("CWSiegeScript", self + "IsAttack()") - - return CWs.IsPlayerAttacking(City.GetLocation()) - -EndFunction - -function StartCombatSoundsLoop() - CombatSoundsLoopInstance = AMBCombatSoundsLoop.Play(game.GetPlayer()) - Sound.SetInstanceVolume(CombatSoundsLoopInstance, 0.5) - -EndFunction - -function StopCombatSoundsLoop() - Sound.StopInstance(CombatSoundsLoopInstance) - -EndFunction - -function setupInteriorSiege(Location SiegeLocation, ObjectReference FieldCORef, ObjectReference CityCenterMarker) -; CWScript.Log("CWSiegeScript", self + "setupInteriorSiege(" + SiegeLocation + ")") - - ;start FortSiege - - ;safety check, in case you just finished a fort or capital siege, and before it finished shutting down, started the final battle - highly unlikely, put I can envision happening - int waitingFor - While CWs.CWFortSiegeCapital.IsStopped() == False - waitingFor += 1 - utility.wait(1) - -; CWScript.Log("CWSiegeScript", self + "setupInteriorSiege(" + SiegeLocation + ") WAITING for CWFortSiegeCapital.IsStopped() == false. Have been waiting for:" + waitingFor, 1, true, true) - - ;this is important enough to make sure even if we aren't explicitly testing in Civil War debug mode we get a message about it -; debug.trace(self + "CWSiegeScript: setupInteriorSiege(" + SiegeLocation + ") WAITING for CWFortSiegeCapital.IsStopped() == false. Have been waiting for:" + waitingFor, 1) - EndWhile - - - CWs.CWFortSiegeSpecialStart.SendStoryEventAndWait(SiegeLocation, FieldCORef, CityCenterMarker, aiValue1 = 3) - CWs.CWFinaleStart.SendStoryEvent(SiegeLocation) - -EndFunction - -function ToggleOffComplexWIInteractions(LocationAlias LocationAliasToToggle) -; CWScript.Log("CWSiegeScript", self + "ToggleOffComplexWIInteractions(" + LocationAliasToToggle + ") calling function on CWScript") - CWs.ToggleOffComplexWIInteractions(LocationAliasToToggle) - -EndFunction - -function ToggleOnComplexWIInteractions(LocationAlias LocationAliasToToggle) -; CWScript.Log("CWSiegeScript", self + "ToggleOnComplexWIInteractions(" + LocationAliasToToggle + ") calling function on CWScript") - CWs.ToggleOnComplexWIInteractions(LocationAliasToToggle) - -EndFunction - - -scene Property CWAttackerStartingScene Auto -scene Property CWSiegeDefenderStartingScene Auto - -Quest Property CWPrepareCity Auto - -sound Property AMBCivilWarBattleDistantLP Auto - -sound Property AMBCivilWarBattleStart Auto - -sound Property AMBCivilWarBattleStartDistant Auto - -ObjectReference Property WhiterunAmbExt01 Auto - -ObjectReference Property WhiterunAmbExt02 Auto - -int Property AMBDistantBattleSoundInstance Auto -{Don't assign a number, gets one when the sound is played as a way to refer to it} -int Property AMBDistantBattleStartInstance Auto -{Don't assign a number, gets one when the sound is played as a way to refer to it} -int Property AMBCloseBattleSoundInstance Auto -{Don't assign a number, gets one when the sound is played as a way to refer to it} - - -ObjectReference Property WhiterunAmbExt03 Auto - -GlobalVariable Property CWDistantCatapultsAMB Auto diff --git a/source/scripts/cwthreatcombatbarksscript.psc b/source/scripts/cwthreatcombatbarksscript.psc deleted file mode 100644 index 6a1768f9..00000000 --- a/source/scripts/cwthreatcombatbarksscript.psc +++ /dev/null @@ -1,529 +0,0 @@ -Scriptname CWThreatCombatBarksScript extends Quest Conditional - -ReferenceAlias Property ImperialBridge Auto - -ReferenceAlias Property ImperialFence Auto -ReferenceAlias Property ImperialFenceArcher Auto -ReferenceAlias Property ImperialFenceMage Auto - -ReferenceAlias Property ImperialHouse Auto - -ReferenceAlias Property ImperialRock Auto - -ReferenceAlias Property ImperialStables Auto - -ReferenceAlias Property ImperialTower Auto -ReferenceAlias Property ImperialTowerArcher Auto -ReferenceAlias Property ImperialTowerMage Auto - -ReferenceAlias Property ImperialTree Auto - -ReferenceAlias Property ImperialWall Auto -ReferenceAlias Property ImperialWallArcher Auto -ReferenceAlias Property ImperialWallMage Auto - -ReferenceAlias Property ImperialWindow Auto -ReferenceAlias Property ImperialWindowArcher Auto -ReferenceAlias Property ImperialWindowMage Auto - - -ReferenceAlias Property SonsBridge Auto - -ReferenceAlias Property SonsFence Auto -ReferenceAlias Property SonsFenceArcher Auto -ReferenceAlias Property SonsFenceMage Auto - -ReferenceAlias Property SonsHouse Auto - -ReferenceAlias Property SonsRock Auto - -ReferenceAlias Property SonsStables Auto - -ReferenceAlias Property SonsTower Auto -ReferenceAlias Property SonsTowerArcher Auto -ReferenceAlias Property SonsTowerMage Auto - -ReferenceAlias Property SonsTree Auto - -ReferenceAlias Property SonsWall Auto -ReferenceAlias Property SonsWallArcher Auto -ReferenceAlias Property SonsWallMage Auto - -ReferenceAlias Property SonsWindow Auto -ReferenceAlias Property SonsWindowArcher Auto -ReferenceAlias Property SonsWindowMage Auto - - - -keyword Property CW1MeleeClose Auto -keyword Property CW1MeleeWide Auto -keyword Property CW1MissileClose Auto -keyword Property CW1MissileWide Auto - -keyword Property CW2MeleeClose Auto -keyword Property CW2MeleeWide Auto -keyword Property CW2MissileClose Auto -keyword Property CW2MissileWide Auto - -keyword Property CW3MeleeClose Auto -keyword Property CW3MeleeWide Auto -keyword Property CW3MissileClose Auto -keyword Property CW3MissileWide Auto - -keyword Property CW4MeleeClose Auto -keyword Property CW4MeleeWide Auto -keyword Property CW4MissileClose Auto -keyword Property CW4MissileWide Auto - -keyword Property CW5MeleeClose Auto -keyword Property CW5MeleeWide Auto -keyword Property CW5MissileClose Auto -keyword Property CW5MissileWide Auto - - -;CWThreatBridgeImperial -;CWThreatBridgeSons - -;CWThreatFenceImperial -;CWThreatFenceImperialArcher -;CWThreatFenceImperialMage -;CWThreatFenceSons -;CWThreatFenceSonsArcher -;CWThreatFenceSonsMage - -;CWThreatHouseImperial -;CWThreatHouseSons - -;CWThreatRockImperial -;CWThreatRockSons - -;CWThreatStablesImperial -;CWThreatStablesSons - -;CWThreatTowerImperial -;CWThreatTowerImperialArcher -;CWThreatTowerImperialMage -;CWThreatTowerSons -;CWThreatTowerSonsArcher -;CWThreatTowerSonsMage - -;CWThreatTreeImperial -;CWThreatTreeSons - -;CWThreatWallImperial -;CWThreatWallImperialArcher -;CWThreatWallImperialMage -;CWThreatWallSons -;CWThreatWallSonsArcher -;CWThreatWallSonsMage - -;CWThreatWindowImperial -;CWThreatWindowImperialArcher -;CWThreatWindowImperialMage -;CWThreatWindowSons -;CWThreatWindowSonsArcher -;CWThreatWindowSonsMage - - - - - -CWScript Property CWs Auto -{BASE OBJECT - pointer to CWScript on CW quest} - -int BattlePhaseToStopBarking = 6 ;once we are in phase 6, we should stop taunting using the combat barks - stage 6 occurs in stage 50 of CWSiege - - -Function ProcessTriggerActor(Actor TriggerActor, float BattlePhase, bool Bridge = false, bool Fence = false, bool House = false, bool Rock = false, bool Stables = false, bool Tower = false, bool Tree = false, bool Wall = false, bool Window = false) -{Trigger calls this function, passing in it's reference. We decide what do to with it.} - -;*** -;debug.StartStackProfiling() - -; CWScript.Log("CWThreatCombatBarksScript", self + "ProcessTriggerActor(" + TriggerActor + ", BattlePhase:" + BattlePhase + ")") - - if BattlePhase >= BattlePhaseToStopBarking -; CWScript.Log("CWThreatCombatBarksScript", self + "ProcessTriggerActor() BattlePhase[" + BattlePhase + "] => BattlePhaseToStopBarking[" + BattlePhaseToStopBarking + "], returning without processing trigger actor.") - return - EndIf - - - ReferenceAlias FactionTypeAlias - ReferenceAlias FactionTypeRoleAlias - GlobalVariable FactionTypeGlobal - GlobalVariable FactionTypeRoleGlobal - - int ActorAllegiance = CWs.GetActorAllgeiance(TriggerActor) - - - - - if ActorAllegiance == CWs.iImperials - if Bridge - FactionTypeAlias = ImperialBridge - FactionTypeGlobal = CWs.CWThreatBridgeImperial - - ElseIf Fence - FactionTypeAlias = ImperialFence - FactionTypeGlobal = CWs.CWThreatFenceImperial - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, ImperialFenceArcher, ImperialFenceMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatFenceImperialArcher, CWs.CWThreatFenceImperialMage) - - - ElseIf House - FactionTypeAlias = ImperialHouse - FactionTypeGlobal = CWs.CWThreatHouseImperial - - ElseIf Rock - FactionTypeAlias = ImperialRock - FactionTypeGlobal = CWs.CWThreatRockImperial - - ElseIf Stables - FactionTypeAlias = ImperialStables - FactionTypeGlobal = CWs.CWThreatStablesImperial - - ElseIf Tower - FactionTypeAlias = ImperialTower - FactionTypeGlobal = CWs.CWThreatTowerImperial - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, ImperialTowerArcher, ImperialTowerMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatTowerImperialArcher, CWs.CWThreatTowerImperialMage) - - - ElseIf Tree - FactionTypeAlias = ImperialTree - FactionTypeGlobal = CWs.CWThreatTreeImperial - - ElseIf Wall - FactionTypeAlias = ImperialWall - FactionTypeGlobal = CWs.CWThreatWallImperial - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, ImperialWallArcher, ImperialWallMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatWallImperialArcher, CWs.CWThreatWallImperialMage) - - - ElseIf Window - FactionTypeAlias = ImperialWindow - FactionTypeGlobal = CWs.CWThreatWindowImperial - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, ImperialWindowArcher, ImperialWindowMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatWindowImperialArcher, CWs.CWThreatWindowImperialMage) - - - EndIf - - elseif ActorAllegiance == CWs.iSons - if Bridge - FactionTypeAlias = SonsBridge - FactionTypeGlobal = CWs.CWThreatBridgeSons - - ElseIf Fence - FactionTypeAlias = SonsFence - FactionTypeGlobal = CWs.CWThreatFenceSons - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, SonsFenceArcher, SonsFenceMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatFenceSonsArcher, CWs.CWThreatFenceSonsMage) - - - ElseIf House - FactionTypeAlias = SonsHouse - FactionTypeGlobal = CWs.CWThreatHouseSons - - ElseIf Rock - FactionTypeAlias = SonsRock - FactionTypeGlobal = CWs.CWThreatRockSons - - ElseIf Stables - FactionTypeAlias = SonsStables - FactionTypeGlobal = CWs.CWThreatStablesSons - - ElseIf Tower - FactionTypeAlias = SonsTower - FactionTypeGlobal = CWs.CWThreatTowerSons - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, SonsTowerArcher, SonsTowerMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatTowerSonsArcher, CWs.CWThreatTowerSonsMage) - - - ElseIf Tree - FactionTypeAlias = SonsTree - FactionTypeGlobal = CWs.CWThreatTreeSons - - ElseIf Wall - FactionTypeAlias = SonsWall - FactionTypeGlobal = CWs.CWThreatWallSons - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, SonsWallArcher, SonsWallMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatWallSonsArcher, CWs.CWThreatWallSonsMage) - - - ElseIf Window - FactionTypeAlias = SonsWindow - FactionTypeGlobal = CWs.CWThreatWindowSons - - FactionTypeRoleAlias = determineRoleAlias(TriggerActor, BattlePhase, SonsWindowArcher, SonsWindowMage) - FactionTypeRoleGlobal = determineRoleGlobal(TriggerActor, BattlePhase, CWs.CWThreatWindowSonsArcher, CWs.CWThreatWindowSonsMage) - - - EndIf - - endif - - If BattlePhase == CWs.CWBattlePhase.GetValue() - - FactionTypeAlias.ForceRefTo(TriggerActor) - FactionTypeGlobal.setValue(1) - - if FactionTypeRoleAlias - FactionTypeRoleAlias.ForceRefTo(TriggerActor) - FactionTypeRoleGlobal.setValue(1) - EndIf - -; CWScript.Log("CWThreatCombatBarksScript", self + "ProcessTriggerActor(" + TriggerActor + ", forced into:" + FactionTypeAlias + ", AND " + FactionTypeRoleAlias + ") and the following globals were set to 1:" + FactionTypeGlobal + " AND " + FactionTypeRoleGlobal) - - Else - ;this took too long and we are in the wrong phase, we can't be sure this guy's role hasn't changed, dump the alias. - - EndIf - - -;*** -;debug.StopStackProfiling() - -EndFunction - -ReferenceAlias function determineRoleAlias(Actor ActorToCheck, Float BattlePhase, ReferenceAlias TypeArcherAlias, ReferenceAlias TypeMageAlias) - if isArcher(ActorToCheck, BattlePhase) - return TypeArcherAlias - - ElseIf isMage(ActorToCheck, BattlePhase) - return TypeMageAlias - - Else - return None - EndIf - -EndFunction - -GlobalVariable function determineRoleGlobal(Actor ActorToCheck, Float BattlePhase, GlobalVariable TypeArcherGlobal, GlobalVariable TypeMageGlobal) - if isArcher(ActorToCheck, BattlePhase) - return TypeArcherGlobal - - ElseIf isMage(ActorToCheck, BattlePhase) - return TypeMageGlobal - - Else - return None - EndIf - -EndFunction - -bool function isArcher(Actor ActorToCheck, float BattlePhase) - - bool returnVal - - if BattlePhase == 1 && ( ActorToCheck.GetLinkedRef(CW1MissileClose) || ActorToCheck.GetLinkedRef(CW1MissileWide) ) - returnVal = True - elseif BattlePhase == 2 && ( ActorToCheck.GetLinkedRef(CW2MissileClose) || ActorToCheck.GetLinkedRef(CW2MissileWide) ) - returnVal = True - elseif BattlePhase == 3 && ( ActorToCheck.GetLinkedRef(CW3MissileClose) || ActorToCheck.GetLinkedRef(CW3MissileWide) ) - returnVal = True - elseif BattlePhase == 4 && ( ActorToCheck.GetLinkedRef(CW4MissileClose) || ActorToCheck.GetLinkedRef(CW4MissileWide) ) - returnVal = True - elseif BattlePhase == 5 && ( ActorToCheck.GetLinkedRef(CW5MissileClose) || ActorToCheck.GetLinkedRef(CW5MissileWide) ) - returnVal = True - Else -; CWScript.Log("CWThreatCombatBarksScript", self + "isArcher(" + ActorToCheck + ") didn't find a linkedRef with a CWXMissileClose/Wide keyword where X was the BattlePhase:" + BattlePhase) - - EndIf - - return returnVal - -EndFunction - -bool function isMage(Actor ActorToCheck, float BattlePhase) - - ;currently there are no mages - return False - -EndFunction - -function ClearAliasIfActorIsInIt(ReferenceAlias AliasToCheck, Actor ActorToCheck, GlobalVariable GlobalToClear) - if AliasToCheck.GetReference() == ActorToCheck - - GlobalToClear.SetValue(0) - AliasToCheck.Clear() -; CWScript.Log("CWThreatCombatBarksScript", self + "ClearAliasIfActorIsInIt(" + AliasToCheck + ", " + ActorToCheck + ") actor is in alias, so cleared alias and set global to 0:" + GlobalToClear) - EndIf - -EndFunction - - - -function ProcessTriggerActorLeaving(Actor TriggerActor) - -;*** -;debug.StartStackProfiling() - - - int ActorAllegiance = CWs.GetActorAllgeiance(TriggerActor) - - if ActorAllegiance == CWs.iImperials - - ClearAliasIfActorIsInIt(ImperialBridge, TriggerActor, CWs.CWThreatBridgeImperial) - - ClearAliasIfActorIsInIt(ImperialFence, TriggerActor, CWs.CWThreatFenceImperial) - ClearAliasIfActorIsInIt(ImperialFenceArcher, TriggerActor, CWs.CWThreatFenceImperialArcher) - ClearAliasIfActorIsInIt(ImperialFenceMage, TriggerActor, CWs.CWThreatFenceImperialMage) - - ClearAliasIfActorIsInIt(ImperialHouse, TriggerActor, CWs.CWThreatHouseImperial) - - ClearAliasIfActorIsInIt(ImperialRock, TriggerActor, CWs.CWThreatRockImperial) - - ClearAliasIfActorIsInIt(ImperialStables, TriggerActor, CWs.CWThreatStablesImperial) - - ClearAliasIfActorIsInIt(ImperialTower, TriggerActor, CWs.CWThreatTowerImperial) - ClearAliasIfActorIsInIt(ImperialTowerArcher, TriggerActor, CWs.CWThreatTowerImperialArcher) - ClearAliasIfActorIsInIt(ImperialTowerMage, TriggerActor, CWs.CWThreatTowerImperialMage) - - ClearAliasIfActorIsInIt(ImperialTree, TriggerActor, CWs.CWThreatTreeImperial) - - ClearAliasIfActorIsInIt(ImperialWall, TriggerActor, CWs.CWThreatWallImperial) - ClearAliasIfActorIsInIt(ImperialWallArcher, TriggerActor, CWs.CWThreatWallImperialArcher) - ClearAliasIfActorIsInIt(ImperialWallMage, TriggerActor, CWs.CWThreatWallImperialMage) - - ClearAliasIfActorIsInIt(ImperialWindow, TriggerActor, CWs.CWThreatWindowImperial) - ClearAliasIfActorIsInIt(ImperialWindowArcher, TriggerActor, CWs.CWThreatWindowImperialArcher) - ClearAliasIfActorIsInIt(ImperialWindowMage, TriggerActor, CWs.CWThreatWindowImperialMage) - - elseif ActorAllegiance == CWs.iSons - - ClearAliasIfActorIsInIt(SonsBridge, TriggerActor, CWs.CWThreatBridgeSons) - - ClearAliasIfActorIsInIt(SonsFence, TriggerActor, CWs.CWThreatFenceSons) - ClearAliasIfActorIsInIt(SonsFenceArcher, TriggerActor, CWs.CWThreatFenceSonsArcher) - ClearAliasIfActorIsInIt(SonsFenceMage, TriggerActor, CWs.CWThreatFenceSonsMage) - - ClearAliasIfActorIsInIt(SonsHouse, TriggerActor, CWs.CWThreatHouseSons) - - ClearAliasIfActorIsInIt(SonsRock, TriggerActor, CWs.CWThreatRockSons) - - ClearAliasIfActorIsInIt(SonsStables, TriggerActor, CWs.CWThreatStablesSons) - - ClearAliasIfActorIsInIt(SonsTower, TriggerActor, CWs.CWThreatTowerSons) - ClearAliasIfActorIsInIt(SonsTowerArcher, TriggerActor, CWs.CWThreatTowerSonsArcher) - ClearAliasIfActorIsInIt(SonsTowerMage, TriggerActor, CWs.CWThreatTowerSonsMage) - - ClearAliasIfActorIsInIt(SonsTree, TriggerActor, CWs.CWThreatTreeSons) - - ClearAliasIfActorIsInIt(SonsWall, TriggerActor, CWs.CWThreatWallSons) - ClearAliasIfActorIsInIt(SonsWallArcher, TriggerActor, CWs.CWThreatWallSonsArcher) - ClearAliasIfActorIsInIt(SonsWallMage, TriggerActor, CWs.CWThreatWallSonsMage) - - ClearAliasIfActorIsInIt(SonsWindow, TriggerActor, CWs.CWThreatWindowSons) - ClearAliasIfActorIsInIt(SonsWindowArcher, TriggerActor, CWs.CWThreatWindowSonsArcher) - ClearAliasIfActorIsInIt(SonsWindowMage, TriggerActor, CWs.CWThreatWindowSonsMage) - - EndIf - -;*** -;debug.StopStackProfiling() - -EndFunction - - -;Called by sieges when the battle phase changes -function RegisterBattlePhaseChanged() - - CWs.CWThreatBridgeImperial.SetValue(0) - CWs.CWThreatBridgeSons.SetValue(0) - CWs.CWThreatFenceImperial.SetValue(0) - CWs.CWThreatFenceImperialArcher.SetValue(0) - CWs.CWThreatFenceImperialMage.SetValue(0) - CWs.CWThreatFenceSons.SetValue(0) - CWs.CWThreatFenceSonsArcher.SetValue(0) - CWs.CWThreatFenceSonsMage.SetValue(0) - CWs.CWThreatHouseImperial.SetValue(0) - CWs.CWThreatHouseSons.SetValue(0) - CWs.CWThreatRockImperial.SetValue(0) - CWs.CWThreatRockSons.SetValue(0) - CWs.CWThreatStablesImperial.SetValue(0) - CWs.CWThreatStablesSons.SetValue(0) - CWs.CWThreatTowerImperial.SetValue(0) - CWs.CWThreatTowerImperialArcher.SetValue(0) - CWs.CWThreatTowerImperialMage.SetValue(0) - CWs.CWThreatTowerSons.SetValue(0) - CWs.CWThreatTowerSonsArcher.SetValue(0) - CWs.CWThreatTowerSonsMage.SetValue(0) - CWs.CWThreatTreeImperial.SetValue(0) - CWs.CWThreatTreeSons.SetValue(0) - CWs.CWThreatWallImperial.SetValue(0) - CWs.CWThreatWallImperialArcher.SetValue(0) - CWs.CWThreatWallImperialMage.SetValue(0) - CWs.CWThreatWallSons.SetValue(0) - CWs.CWThreatWallSonsArcher.SetValue(0) - CWs.CWThreatWallSonsMage.SetValue(0) - CWs.CWThreatWindowImperial.SetValue(0) - CWs.CWThreatWindowImperialArcher.SetValue(0) - CWs.CWThreatWindowImperialMage.SetValue(0) - CWs.CWThreatWindowSons.SetValue(0) - CWs.CWThreatWindowSonsArcher.SetValue(0) - CWs.CWThreatWindowSonsMage.SetValue(0) - - ImperialBridge.clear() - - ImperialFence.clear() - ImperialFenceArcher.clear() - ImperialFenceMage.clear() - - ImperialHouse.clear() - - ImperialRock.clear() - - ImperialStables.clear() - - ImperialTower.clear() - ImperialTowerArcher.clear() - ImperialTowerMage.clear() - - ImperialTree.clear() - - ImperialWall.clear() - ImperialWallArcher.clear() - ImperialWallMage.clear() - - ImperialWindow.clear() - ImperialWindowArcher.clear() - ImperialWindowMage.clear() - - - SonsBridge.clear() - - SonsFence.clear() - SonsFenceArcher.clear() - SonsFenceMage.clear() - - SonsHouse.clear() - - SonsRock.clear() - - SonsStables.clear() - - SonsTower.clear() - SonsTowerArcher.clear() - SonsTowerMage.clear() - - SonsTree.clear() - - SonsWall.clear() - SonsWallArcher.clear() - SonsWallMage.clear() - - SonsWindow.clear() - SonsWindowArcher.clear() - SonsWindowMage.clear() - - -EndFunction -