AdrianeMapMaker
6 years ago
How to make ai dont sell their captured faction buildings

Just remove the buildings FS_Type KindOfs using map.ini


[[INTRODUCTION:]
For modders - you probably know or met FS_KindOfs
BTW These are the FS_Kindof i am talking about.(If you dont know them)

FS_STRATEGY_CENTER
FS_SUPPLY_CENTER
FS_BLACK_MARKET
FS_SUPERWEAPON
FS_SUPPLY_DROPZONE
FS_AIRFIELD
FS_WARFACTORY
FS_BARRACKS
FS_ADVANCED_TECH
FS_TECHNOLOGY
FS_BASE_DEFENSE
FS_FACTORY
FS_POWER
FS_INTERNET_CENTER
FS_FAKE


Note: Just a note - Removing FS_KINDOF has drawbacks - FS_KindOF are tied with sabotagers (removing fs_kind of to the buildings makes the sabotage ability doesnt work for em)


;---------------------
You can use the finalbig program to see what specific FS_KINDOF are intact in a specific building
http://www.cnclabs.com/downloads/details.aspx?id=240 

How to use FinalBig:
http://www.cnclabs.com/forums/cnc_postst16829_Tutorials-By-AdrianeMapMaker.aspx 
;---------------------


[[HOW TO DO IT:]


1st. = Go to your map folder
2nd. = Make a text file there and named it map.ini
3rd. = The easy peasy coding part


[[CODING:]
1st. Open map.ini.
2nd. Find the specific building that you wanted to be Immuned to ai-auto selling mechanic using finalbig
3rd. Find its kind of and copy it to our format ( See the example )

Heres the Code Format:
Object {Object Name}
KindOf = {Existing KindOf with No FS_KindOF}
End

Example:
;Original KindOF are intact in this one [(FS_FACTORY) IS existing in here - just remove it]
Object AmericaCommandCenter
  KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE COMMANDCENTER SCORE CAPTURABLE FS_FACTORY AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY
End

;the version with no FS_KindOf
Object AmericaCommandCenter
  KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE COMMANDCENTER SCORE CAPTURABLE AUTO_RALLYPOINT MP_COUNT_FOR_VICTORY
End


Save and youre done


Contact :
Email - agentyves06@gmail.com
Discord - AdrianeYves#2285

https://discord.gg/tJ6zyGb 
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




Sponsor
thepredatorbg
6 years ago
You can also do this:
Object AmericaCommandCenter
KindOf = -FS_FACTORY
End