Renegade Projects Network Forums
attacking or garrisoning a building - Printable Version

+- Renegade Projects Network Forums (https://forums.renegadeprojects.com)
+-- Forum: Modding (https://forums.renegadeprojects.com/forumdisplay.php?fid=3)
+--- Forum: Red Alert 2 & Yuri's Revenge Editing (https://forums.renegadeprojects.com/forumdisplay.php?fid=8)
+--- Thread: attacking or garrisoning a building (/showthread.php?tid=986)



attacking or garrisoning a building - Drizzt DoUrden - 18.05.2008

Ok I have been working on editing the AI. After much trials my uncle & I have gotten the computer to build alot of what we put into the game. One problem is the units do not garrison buildings. is there a number that they need in the AI. In the following if I am reading this correct the 6 digit numbers are building codes (I guess), if so where can I find a list of these codes? I do remember a post that stated how to make buidlings garrisonable, but all info was lost when the computer crashed. And is there a way to force the computer to hunt & capture oil derricks, hospitals, and airports?

[0C9C878C-G]
Name=Allied Refinery Guard
0=58,1
1=5,10
2=58,196609
3=5,10
4=58,196609
5=5,10
6=6,1

[0CE4CC8C-G]
Name=Allied Base Guard - Tech
0=58,131078
1=11,11

[0CE4C2DC-G]
Name=Allied Base Defense
0=58,131075
1=11,11


RE: attacking or garrisoning a building - DCoder - 18.05.2008

Have you read DeeZire's AI.ini guide? It's bundled with my AI Editor, and my AI Editor does the hard work for you anyway.


RE: attacking or garrisoning a building - Drizzt DoUrden - 24.05.2008

DCoder Wrote:Have you read DeeZire's AI.ini guide? It's bundled with my AI Editor, and my AI Editor does the hard work for you anyway.

i have your editor but it does not work on vista.i am trying to get a computer with XP or even ME. i have read an AI file, dont believe it is his. from what i was told the one i read was supposed to be a quick verison that was better. i guess i will have to get another copy from my uncle.


i did find the mod encyclopedia, but i do not see about making builddings garrisonable. i am still searching s we speak


RE: attacking or garrisoning a building - DCoder - 24.05.2008

The file bundled with my editor is DZ's, I just converted it from plain text to html.


RE: attacking or garrisoning a building - Drizzt DoUrden - 24.05.2008

ok, i found that file. thanks.

A Note On Structure Numbers
When used in ScriptTypes, the structure number takes any of several formats and is derived by finding the structure in the [BuildingTypes] list of RULES(MD).INI and subtracting ONE from this structures' number in that list (equivalent to renumbering the list from 0) - this is the explicit number of that structure and is the number to use as the second parameter of the action. Any one of several amendments can be made to this number;-

- add 131072 to the number, so GAPOWR (number 1 in RULES(MD).INI thus number 0 for this purpose) becomes 131072

- add 196608 to the number, so GAPOWR (number 1 in RULES(MD).INI thus number 0 for this purpose) becomes 196608

- add 65534 to the number, so GAPOWR (number 1 in RULES(MD).INI thus number 0 for this purpose) becomes 65534

It has not been determined what significance or effect the different numbering systems have (if any). Changing them at random appears to have no effect although it is thought that there is additional logic attached to them.


i guess you were referring to this. what i do not understand is how to make the computer garrison buildings. i put the 64,0 in the aimd, but they just go to attack. like the paratroopers, they drop and attack even if they were drop a ways from the nearest enemy instead of garrison. the number 1 is that referring to the listing of the building?

[BuildingTypes]
;1=GAPOWR
;2=GAREFN
;3=GACNST
;4=GAPILE
These are my buildings that are added for a new mod that is in the works. Right now I am trying to get the Americans working first. Did I correctly modify the AIMD file? (Included)

407=ALLCON ; Allied Construction Yard
408=ALLPOW ; Allied Power Plant
409=ALLAPOW ; Allied Advanced Power Plant
410=ALLOIL ; Allied Oil Derrick
411=ALLREF ; Allied Refinery
412=ALLBAR ; Allied Barracks
413=ALLADV ; Allied Advanced Barracks
414=ALLWAR ; Allied WarFactory
415=ALLAFC ; Allied Air Force Command
416=ALLRAD ; Allied Radar
417=ALLTECH ; Allied Battle Lab
418=AINDUSTRY ; Industrial Plant
419=ALLDEPOT ; Allied Service Depot
420=ALLNAVY ; Allied Navel Yard
421=ALLGUARDTOWER ; Allied Guard Tower
422=ALLBUNKER1 ; Allied Bunker1
423=ALLBUNKER2 ; Allied Bunker2
424=ALLFLAK ; Allied Flak Cannon
425=ALLAIR

; ******************************** Soviet Buildings *******************************

426=SOVCON ; Soviet Construction Yard
427=SOVPOW ; Soviet Power Plant
428=SOVAPOW ; Allied Advanced Power Plant
429=SOVOIL ; Soviet Oil Derrick
430=SOVREF ; Soviet Refinery
431=SOVBAR ; Soviet Barracks
432=SOVADV ; Soviet Advanced Barracks
433=SOVWAR ; Soviet WarFactory
434=SOVAFC ; Soviet Air Force Command
435=SOVRAD ; Soviet Radar
436=SOVTECH ; Soviet Battle Lab
437=SINDUSTRY ; Industrial Plant
438=SOVDEPOT ; Soviet Service Depot
439=SOVNAVY ; Soviet Navel Yard
440=SOVGUARDTOWER ; Soviet Guard Tower
441=SOVBUNKER1 ; Soviet Bunker1
442=SOVBUNKER2 ; Soviet Bunker2
443=SOVFLAK ; Soviet Flak Cannon
444=SOVAIR

; ******************************** German Buildings *****************************

445=GERCON ;German Construction Yard
446=GERPOW ; German Power Plant
447=GERAPOW ; Allied Advanced Power Plant
448=GEROIL ; German Oil Derrick
449=GEREFN ; German Refinery
450=GERBAR ; German Barracks
451=GERADV ; German Advanced Barracks
452=GERWAR ; German WarFactory
453=GERRAD ; German Radar
454=GERTECH ; German Battle Lab
455=GINDUSTRY ; Industrial Plant
456=GERDEPOT ; German Service Depot
457=GERNAVY ; German Navel Yard
458=GERGUARDTOWER ; German Guard Tower
459=GERBUNKER1 ; German Bunker1
460=GERBUNKER2 ; German Bunker2
461=GERFLAK ; German Flak Cannon
462=GERAFC ;Soviet Air Force
463=GERAIR ;German AFC


RE: attacking or garrisoning a building - DCoder - 24.05.2008

lol... I only see one script that you changed, and it is scripted to loop forever without running your line. Try instead creating a new GI-only TaskForce, a new Script that consists only of 64,0 / 49,0 / 6,1 , and attach them to a TeamType that's used often, like 08DA30EC-G.


RE: attacking or garrisoning a building - Drizzt DoUrden - 24.05.2008

when the computer drops paratroopers they do not capture buildings, is this some thing with the AI? how do i fix this? I noticed in something dcoder wrote that the computer only reads 50 scripts (not sure which, i have to find again), so if this is true should i try to make 16 scripts for each side?