Page 2 of 2

Re: Making AI Repair Hardpoints?

Posted: Sat Sep 17, 2016 9:30 pm
by Ascertes
AQT wrote:AI will repair stuff if their UnitType is "pilot" and if one of their goals is "Conquest." This is similar to how AI will use snipe hint nodes if their UnitType is "sniper" and if one of their goals is "Conquest."
Alright, so how would it look in an LUA? Most of my modding work is BF1 so I'm not too terribly familiar with all the ins and outs of bf2 LUA scripting.

EDIT: I DID IT! I DID IT! HUZZAH!

Added this line to my LUA:

Code: Select all

    AddAIGoal(REP, "Conquest", 100)
    AddAIGoal(CIS, "Conquest", 100)
The only drawback however is that now I have a minimap for some reason. Wonder how I get rid of that?

EDIT2: They're not repairing them as much as I'd like...How do I increase their likelihood of repairing?

Re: Making AI Repair Hardpoints?

Posted: Sun Sep 18, 2016 5:37 am
by thelegend
Ascertes wrote:Alright, so how would it look in an LUA? Most of my modding work is BF1 so I'm not too terribly familiar with all the ins and outs of bf2 LUA scripting.
DisableSmallMapMiniMap() removes the small minimap from your HUD.

Re: Making AI Repair Hardpoints?

Posted: Sun Sep 18, 2016 2:15 pm
by AQT
Ascertes wrote:They're not repairing them as much as I'd like...How do I increase their likelihood of repairing?
The percentage of AI tasked with repairing things is relative to the other goals you have specified. For example, you currently have:

Code: Select all

AddAIGoal(REP, "Conquest", 100)
I don't know what other goals you are using, but let's say they are these:

Code: Select all

AddAIGoal(REP, "OtherGoal1", x)
AddAIGoal(REP, "OtherGoal2", y)
The percentage of AI tasked with repairing things (or "Conquest"-ing) would be 100 divided by the sum of 100, x, and y or 100/(100 + x+ y).

Re: Making AI Repair Hardpoints?

Posted: Sun Sep 18, 2016 2:58 pm
by Ascertes
I have this as far as goals go:

Code: Select all

AddAIGoal(REP, "Deathmatch", 100)
AddAIGoal(REP, "Conquest", 100)
So, 100/(100 + 100) = 0.5

I'm assuming I can change those 2 numeric values?

Re: Making AI Repair Hardpoints?

Posted: Sun Sep 18, 2016 3:03 pm
by AQT
Yeah, you can change them. But make sure the goals for the CIS also add up to the same total even if they have less or more goals.

Re: Making AI Repair Hardpoints?

Posted: Sun Sep 18, 2016 3:45 pm
by Ascertes
AQT wrote:Yeah, you can change them. But make sure the goals for the CIS also add up to the same total even if they have less or more goals.
Noted! Thank you so much for your help :)