Mraah
Posts: 1085
Joined: 2/20/2008 Status: offline
|
I was poking around the lua's in the BASIS/SCRIPTS/AI folder and I came across the serviceLUA and this appears to contain formulas regarding line-of-sight and targeting. One interesting line of code inside this file talks about the PSYCHO attribute (snipet below in quotes) ... Basically, from what I can tell, if your merc has the PSYCHO attribute and it meets one of those conditions (added up, all conditions =5/5 = 100%) then your merc will unleash a burst fire automatically (if you got the AP) .. note the last line that I hi-lighted in bold ... quote:
selectFireMode = function(id, target, dist, strategy) calls.enter("service.selectFireMode",id) local aggro = 0 local phobia = string.upper(getPersonParameterStr(id, "PHOBIA")) local hated_nation = string.upper(getPersonParameterStr(id, "HATED_NATIONALITY")) local target_nation = string.upper(getPersonParameterStr(target, "NATIONALITY")) local isRacist = string.upper(getPersonParameterStr(id, "RACIST")) local race = string.upper(getPersonParameterStr(id, "RACE")) local target_race = string.upper(getPersonParameterStr(target, "RACE")) local isSexist = string.upper(getPersonParameterStr(id, "SEXIST")) local sex = string.upper(getPersonParameterStr(id, "SEX")) local target_sex = string.upper(getPersonParameterStr(target, "SEX")) if(phobia == "PSYCHO") then aggro = aggro + 2 log(id, "Äà ÿ ïðîñòî ïñèõ! Ìîå àãðî:", aggro) end if(hated_nation == target_nation) then aggro = aggro + 1 log(id, "Äà ýòî æå äîëáàííûé", target_nation, "ß èõ íåíàâèæó! Ìîå àãðî:", aggro) end if((isRacist == "YES") and (race ~= target_race)) then aggro = aggro + 1 log(id, "Äà îí æå äîëáàííûé", target_race, "ß èõ íåíàâèæó! Ìîå àãðî:", aggro) end if(((isSexist == "YES") or (isSexist == "VERY")) and (sex ~= target_sex)) then aggro = aggro + 1 log(id, "ß æå ñåêñèñò! Ìîå àãðî:", aggro) end aggro = aggro / 5 local aggro_percent = math.floor(aggro * 100) log(id, "Ïðîöåíò àãðî:", aggro_percent) if(math.random() < aggro) then setFiringType(id, "burst")
< Message edited by Mraah -- 1/24/2009 11:27:40 PM >
|