 |
Forum Info
|
 |
Forum Members: 18,537
Total Threads: 8,627
Posts: 94,210
Administrators:
DeeZire, Redemption
There are currently 117 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Red Alert 2 & Yuri's Revenge Editing Discuss any modding related issues to do with Red Alert 2 and Yuri's Revenge here. |
08-25-2005, 09:20 AM
|
#1 (permalink)
|
|
Junior Member
Join Date: Jul 2004
Posts: 19
|
AI building both Sentry Guns and Pillboxes
Odd problem this.
My view is that Sentries/Pillboxes are homologous so they're comparable to the seperate Allied and Soviet Dogs. To this end I've made it so Allies will always build Pillboxes and Soviets will always build Sentry Guns (regardless of what MCV or other tech they have).
To do this I simply made "Prerequisite=BARRACKS" for both defences, and used "ForbiddenHouses=" to stop players building both.
The problem is the AI will build both defences. I assume this is because there is no longer a side-specific Construction Yard in the "Prerequisite=" line. Changing "Owner=" to only the countries that should own the defence seems to work, but obviously I get the "new construction options" bug.
Is there any way round this?
|
|
|
08-25-2005, 09:51 AM
|
#2 (permalink)
|
|
Senior Member
Join Date: Jul 2003
Location: Lithuania, Central Europe
Posts: 1,048
|
Have you changed their AIBasePlanningSide=? Have you tried RequiredHouses=? (Required/ForbiddenHouses always fix the NCO bug, at least for me.)
You could also leave (for the pillbox) Prerequisite=GAPILE and set up PrerequisiteOverride=NAHAND,YABRCK, though that might not change anything.
Failing that, you could revert all changes, and then leave these two as AI-only, and give players copies of them with your desired changes, and ensure the AI doesn't want to build them (AIBuildThis=no). This should be done in mpmodes, not the main rules if you want to keep the singleplayer campaign functional.
|
|
|
08-25-2005, 12:27 PM
|
#3 (permalink)
|
|
Junior Member
Join Date: Jul 2004
Posts: 19
|
This is for standard RA2 btw. And I neglected to mention RequiredHouses: no, it doesn't work.
How would "AIBasePlanningSide=" help? It's already 0 for the Pillbox and 1 for the Sentry Gun.
Also "PrerequisiteOverride" overrides the various houses tags I believe, so I don't think that will help.
Anyway, thanks for the help, I guess I'll embark on the messy hacking method and try 2 Sentry Guns and 2 Pillboxes.
|
|
|
08-25-2005, 12:54 PM
|
#4 (permalink)
|
|
Junior Member
Join Date: Jul 2004
Posts: 19
|
Nope, can't get this to work. Copy+pasting old code and creating two new defences with "AIBuildThis=no" still (unbelievably) produces AI players building both defences (actually, just the Allied AI doing it now). I also get the NCO error no matter what combination of "Owner=" and houses tags I use. The new defences also get appended to the end of the armoury tab, rather than appear in the same place as normal Sentry Guns and Pillboxes
|
|
|
08-25-2005, 01:27 PM
|
#5 (permalink)
|
|
Senior Member
Join Date: Jul 2003
Location: Lithuania, Central Europe
Posts: 1,048
|
Wow, I seem to have forgotten quite a lot of standard RA2 differences, sorry about that.
Well, I just tried that and, well, played for >30 minutes with speed build and didn't see the AI getting confused, nor the NCO occuring... Here's what I changed:
[GAPILL]
TechLevel=-1 ; AI can use it, we can't
[NALASR]
TechLevel=-1 ; AI can use it, we can't
[GAPILL2]
Image=GAPILL
;code identical to GAPILL goes here
Prerequisite=BARRACKS
AIBuildThis=no
IsBaseDefense=no
Owner=British,French,Germans,Americans,Alliance,Ru ssians,Confederation,Africans,Arabs
RequiredHouses=British,French,Germans,Americans,Al liance
[NALASR2]
Image=NALASR
;code identical to NALASR goes here
Prerequisite=BARRACKS
AIBuildThis=no
IsBaseDefense=no
Owner=British,French,Germans,Americans,Alliance,Ru ssians,Confederation,Africans,Arabs
RequiredHouses=Russians,Confederation,Africans,Ara bs
[BuildingTypes]
++=GAPILL2
++=NALASR2
With this setup, the only problem is the sidebar ordering, which seems to be dependent on the [BuildingTypes] ordering, like in TS. Well, I believe I have a fix for that too:
Rename the existing entries on that array from GAPILL to GAPILL2, from NALASR to NALASR2. Then add GAPILL and NALASR to the end of the array. That way, the array ordering remains intact, the sidebar is correctly ordered, and as far as I know, nothing gets damaged.
|
|
|
08-25-2005, 02:58 PM
|
#6 (permalink)
|
|
Junior Member
Join Date: Jul 2004
Posts: 19
|
Right I'm a moron. Your code looked similar to mine but I re-did it all to make sure and, low and behold, the "IsBaseDefense=no" tag was missing from the new Sentry Gun. Hence the Allied AI was still making Sentries.
However the order still isn't working: the Sentry Gun still appears last in the list even if you tell the AI to build the new one and give the only NALASR to the human players. However the Pillbox appears in the correct place... This still occurs even if you comment-out the new Sentry Gun.
|
|
|
08-26-2005, 02:26 AM
|
#7 (permalink)
|
|
Senior Member
Join Date: Jul 2003
Location: Lithuania, Central Europe
Posts: 1,048
|
Can I see your [BuildingTypes] array? Preferably inside [code ] [/code ] so it doesn't blow the page.
|
|
|
08-26-2005, 03:17 AM
|
#8 (permalink)
|
|
Junior Member
Join Date: Jul 2004
Posts: 19
|
Code:
[BuildingTypes]
1=GAPOWR
2=GAREFN
3=GACNST
4=GAPILE
5=GASAND
6=GADEPT
7=GATECH
8=GAWEAP
9=GTGCAN
10=NAPOWR
11=NATECH
12=NAHAND
13=GAWALL
14=NARADR
15=NAWEAP
16=NAREFN
17=NAWALL
;18=NATMPL
18=CAHSE07
19=NAPSIS
20=NAWAST
21=NALASR
22=NASAM
23=GARADR
24=GAYARD
25=NAIRON
26=NACNST
27=NADEPT
28=GACSPH
29=GADUMY
30=GAWEAT
31=CABHUT
32=GALITE
33=REDLAMP
34=GRENLAMP
35=BLUELAMP
36=YELWLAMP
37=PURPLAMP
38=INORANLAMP
39=INGRNLMP
40=INREDLMP
41=INBLULMP
;;These might be RA2 buildings, not sure.
42=CITY01
43=CITY02
44=CITY03
45=CITY04
46=CITY05
47=CITY06
;;This is an old hospitol, not sure if it is used.
48=CAHOSP
49=INGALITE
50=INYELWLAMP
51=INPURPLAMP
52=NEGLAMP
53=NEGRED
54=TESLA
55=NAMISL
56=ATESLA
57=CAARMR
58=TSTLAMP
59=NAHPAD
60=AMMOCRAT
61=GAGREEN
62=NAYARD
63=GASPYSAT
64=GAGAP
65=CALAB
66=NANRCT ; Soviet Nuclear Reactor
67=GAPILL
68=NAFLAK ; Flak Cannon
69=CAOUTP ; Outpost
70=CATHOSP ; Tech Hospital
71=CAAIRP ; Civilian Airport
72=CAOILD ; Tech Oil Derrick
73=NACLON ; Soviet Cloning Vats
74=GAOREP ; Allied Ore Processor
;NEW RA2 BUILDINGS
75=CACITY01
76=CACITY02
77=CACITY03
78=CACITY04
79=CANEWY01
80=CANEWY04
81=CANEWY05
82=CASWST01
83=CATECH01
84=CATEXS01
85=CATEXS02
86=CAWASH01
87=CAFARM01
88=CAFARM02
89=CALIT01E
90=CALIT01N
91=CALIT01S
92=CALIT01W
93=CAMISC01
94=CAMISC02
95=CAMISC03
96=CAMISC04
97=CAPOL01E
98=CAPOL01N
99=CAPOL01S
100=CAPOL01W
101=CASIN01E
102=CASIN01N
103=CASIN01S
104=CASIN01W
105=CAPARS01
106=GAAIRC
107=CAFRMA
108=CAFRMB
109=CAWASH05
110=CAWASH04
111=CAWASH03
112=CAWASH07
113=CAWASH11
114=CAWSH12
115=CAWASH14
116=CAWASH09
117=CAWASH10
118=CAWASH13
119=CAARMY01
120=CAUSFGL
121=CAWASH08
122=CALIT03E
123=CALIT03N
124=CALIT03S
125=CALIT03W
126=CALIT02L
127=CALIT02R
128=CAHSE01
129=CAWT01
130=CATS01
131=CABARN02
132=CAWA2A
133=CAWA2B
134=CAWA2C
135=CAWA2D
136=AMRADR
137=CAPRS03
138=CAGARD01
139=CARUS01
140=CAMIAM01
141=CAEURO01
142=CAMIAM02
143=CANWY05
144=MAYAN
145=CAEUR1
146=CAEUR2
147=CAEUR04
148=CAMEX01
149=CARUS02A
150=CARUS02B
151=CARUS02C
152=CARUS02D
153=CARUS02E
154=CARUS02F
155=CANEWY06
156=CANEWY07
157=CANEWY08
158=CAPARS02
159=CAPARS08
160=CAPARS09
161=CARUS03
162=CANEWY10
163=CANEWY11
164=CANEWY12
165=CANEWY13
166=CANEWY14
167=CANEWY15
168=CANEWY16
169=CANEWY17
170=CANEWY18
171=CAPARS04
172=CAPARS05
173=CAPARS06
174=CAPARS07
175=CAWASH15
176=CAPARS10
177=CAPARS13
178=CAPARS14
179=CAGAS01
180=CAPARS11
181=CAPARS12
182=CAFARM06
183=CAMIAM04
184=NAPSYB
185=NAPSYA
186=CAIND01
187=CACOLO01
188=CANWY09
189=CANWY22
190=CANWY23
191=CANWY24
192=CANWY25
193=CANWY26
194=CATEXS03
195=CATEXS04
196=CATEXS05
197=CARUS02G
198=CACHIG04
199=CAMIAM03
200=CARUS07
201=CATEXS06
202=CATEXS07
203=CATEXS08
204=CACHIG01
205=CACHIG02
206=CACHIG03
207=CAWASH16
208=CAWASH17
209=CACHIG05
210=CAWASH19
211=CARUS08
212=CARUS09
213=CARUS10
214=CARUS11
215=CANEWY20
216=CANEWY21
217=CARUS04
218=CARUS05
219=CARUS06
220=CAMSC01
221=CAMSC02
222=CAMSC03
223=CAMSC04
224=CAMSC05
225=CAMSC06
226=CAMSC07
227=CAWASH18
228=CAEURO05
229=CAPARK01
230=CAPARK02
231=CAPARK03
232=CAHSE02
233=CAHSE03
234=CAHSE04
235=CASTRT01
236=CASTRT02
237=CASTL01
238=CASTL02
239=CASTL03
240=CASTL04
241=NAPSYA
242=CAHSE05
243=CAHSE06
244=CAMIAM05
245=CAMIAM06
246=CAMIAM07
247=CAFNCB
248=CAFNCW
249=CAMEX02
250=CAMEX03
251=CAMEX04
252=CAMEX05
;253=NADEPT
254=CACHIG06
255=CAMSC08
256=CAMSC09
257=CAARMY02
258=CAARMY03
259=CAARMY04
260=TEMMORLAMP
261=TEMDAYLAMP
262=TEMDUSLAMP
263=TEMNITLAMP
264=SNOMORLAMP
265=SNODAYLAMP
266=SNODUSLAMP
267=SNONITLAMP
268=CAKRMW
269=CARUFGL
270=CAFRFGL
271=CAIRSFGL
272=CACUFGL
;273=CANFGL
274=CASKFGL
275=CALBFGL
276=CAMIAM08
277=CAMISC05
278=CAMISC06
279=CASTL05A
280=CASTL05B
281=CASTL05C
282=CASTL05D
283=CASTL05E
284=CASTL05F
285=CASTL05G
286=CASTL05H
287=CAMSC10
288=CAGEFGL
289=CAUKFGL
290=CAWASH06
291=CAMSC11
292=CAMSC12
293=CAMSC13
294=CAPOFGL
295=CAMSC12A
296=CAMOV01
297=CAMOV02
298=CABUNK01
299=CABUNK02
300=CAFNCP
301=CASTRT03
302=CASTRT04
303=CASTRT05
304=NALAAI
305=GAPIAI
NALASR and GAPILL where they were, the AI ones added to the end (NALAAI and GAPIAI).
I'm gonna go through it all with a fine-tooth comb anyway because I was tired yesterday and making silly mistakes anyway 
|
|
|
08-26-2005, 05:00 AM
|
#9 (permalink)
|
|
Junior Member
Join Date: Jul 2004
Posts: 19
|
K resorted to going back to old, old code and removing the NCO sound, this revolves all problems. Thanks for your help DCoder.
|
|
|
08-26-2005, 05:14 AM
|
#10 (permalink)
|
|
Senior Member
Join Date: Jul 2003
Location: Lithuania, Central Europe
Posts: 1,048
|
You're welcome. Although disabling that sound won't fix it completely, you're just hiding the bug and not fixing it.. in some cases the bug also causes the sidebar to jump back upwards each time the bug is triggered. Quite annoying if one has enough build options to make the sidebar scroll, especially in things like Unholy Alliance... But then again, UA is not meant to be played by AI, so no need to fix AI there.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:21 PM.
|