Posted: Thu Mar 09, 2017 6:27 pm Post subject:
Letting AI not sell pre-assigned buildings
Subject description: Lost it
Hey all!
I'm making a sort of compstomp / survival map and I want to give the AI buildings. I already made triggers for them but unfortunately, they sell off all the buildings except the oilderrick I gave them. I tried to match the oilderrick code with for example the grandcannon code but they still sell the grand cannon. Any suggestions?
I think it's impossible for a map only.
You would have to edit art.ini to create a building without any buildup and maps don't allow art.ini code in them, only rules.ini. _________________ SHP Artist of Twisted Insurrection: Nod buildings
multi-player works different than single-player
many things work in SP maps that don't work in MP. (like adding new houses for a map only, create trigger for a certain player only etc) _________________ SHP Artist of Twisted Insurrection: Nod buildings
Setting general IQ level to 1 even prevents the AI from deploying their MCV. Also, I've set the RepairSell and SellBack IQ's to 9. Now the AI doesn't repair their buildings but they still sell them...
Seems to me that their is some hardcoding in RA2 that can't be circumvented?
you can try dummy deployer units, which have no weapon on the unit and give the deployed building a dummy weapon (0 damage).
This way the AI will have to deploy the units to fight with them, and since the buildings have a weapon with which the AI can fight, it wont sell them. _________________ SHP Artist of Twisted Insurrection: Nod buildings
In Multiplayer game, AI will fire sell when it lost all production buildings for a while (in about 50s IIRC).
Try give it a barrack surrounded with wall off map. QUICK_EDIT
How about making a new building entries for buildings you want to put on your map?
For instance on Grand Cannon.
rules.ini
Code:
[BuildingTypes]
XX=GTGCAN2
[GTGCAN2]
(Copy all the stuffs on GTGCAN)
art.ini
Code:
[GTGCAN2]
Image=GTGCAN
Remapable=yes
NewTheater=yes
Cameo= GCANICON
Foundation=2x2
Height=3 ; experiment with this
Buildup=
DemandLoadBuildup=true
FreeBuildup=true
PrimaryFireFLH=250,0,230
CanHideThings=True
CanBeHidden=False
OccupyHeight=2
DamageFireOffset0=-1,28
On the art.ini, remove the buildup, therefore there won't be a buildup anim for GTGCAN2 while you still have the Grand Cannon image because of Image=GTGCAN tag and AI should not be able to sell it because of missing buildup. QUICK_EDIT
How about making a new building entries for buildings you want to put on your map?
For instance on Grand Cannon.
maps dont accept any art.ini entries at all. they only accept rules.ini entries and when they do it doesent like when you make new entries to the [InfantryTypes] or [VehicleTypes] lists spawning imageless units despite the use of an Image= tag it probably doesent like additions to the [BuildingTypes] but i dont know.
if you put AIBuildThis=yes on say the repair bays that the AI never uses, it will build them, or the nuclear reactor, or modified oil derreks perhaps.
if you wanted to dupe the french AI into building a second grand cannon
they only seem to build 1 of the AIBuildThis=yes building so if you wanted them to build say 2 super oil derreks you would have to mod the oil derrek with the right base buildings tags, and then splice it over some unused civilian buildings and insert it into the map. the AI will build it if its techlevel is -1 by the way.
EDIT: it just occured to me you might be having a problem because you walled up the MCV and the AI is triggered to auto sell and go to hunt, in which case i can confirm a walled barracks outside the map will prevent it. QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum