Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

SERVICE.LUA --- Line-Of-Sight/Targetting Formulas?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Current Games From Matrix.] >> [Modern] >> Hired Guns: The Jagged Edge >> Mods >> SERVICE.LUA --- Line-Of-Sight/Targetting Formulas? Page: [1]
Login
Message << Older Topic   Newer Topic >>
SERVICE.LUA --- Line-Of-Sight/Targetting Formulas? - 1/24/2009 11:24:34 PM   
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 >
Post #: 1
RE: SERVICE.LUA --- Line-Of-Sight/Targetting Formulas? - 2/18/2009 1:28:25 AM   
SlickWilhelm


Posts: 1854
Joined: 7/22/2007
From: Rochester, MN
Status: offline
Nice find. Did you find any evidence of any of the other character traits affecting any behavior?

_____________________________

Beta Tester - Brother Against Brother
Beta Tester - Commander: The Great War
Beta Tester - Desert War 1940-42

(in reply to Mraah)
Post #: 2
Page:   [1]
All Forums >> [Current Games From Matrix.] >> [Modern] >> Hired Guns: The Jagged Edge >> Mods >> SERVICE.LUA --- Line-Of-Sight/Targetting Formulas? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.344