SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Snake on March 14, 2011, 07:16:47 PM

Title: [SOLVED ] .lua question
Post by: Snake on March 14, 2011, 07:16:47 PM
Hey I saw this in the tat2i.lua file for mos eisley near the top it said
SetTeamAggressiveness(IMP, 0.95)
SetTeamAggressiveness(ALL, 0.95)

What happens if you increase this? I dont understand how theyre aggressiveness can increase.

Also what does SetDenseEnvironment("false") do. What is the visible difference between true and false?
Title: Re: [HELP] .lua question
Post by: Bamdur on March 14, 2011, 09:46:57 PM
For the top part, In the shipped guides it said that line of code was obbsolete and had no purpose, the dense enviroment im not complely sure about
Title: Re: [HELP] .lua question
Post by: Snake on March 15, 2011, 10:28:57 AM
Could you test it for me? Just make a map with a few buildings or something and then set it to true and false and see if theres a difference. I can't open zeroeditor so..
Title: Re: [HELP] .lua question
Post by: Led on March 15, 2011, 04:38:33 PM
You can do this with just a mission.lvl munge. 

Battlebelks tool would work or BFbuilderPro.

I thought I remembered that dense environments have an effect on AI aiming, but I can not find the link at the moment that describes that.  It is probably a subtle difference.

update:

Here is the information on the dense environment, taking from the folder
C:\LucasArts\BFBuilder\Documentation\luaguide.htm

>> ReadDataFile here is calling the world.lvl and it's assets here.
>> SetDenseEnvironment affects AI behavior so they are tuned for urban
>> or open combat. SetMinFlyHeight declarations are in meters and you should always
>> make sure your values meet your terrain heights.


Title: Re: [SOLVED ] .lua question
Post by: Phobos on May 08, 2012, 09:29:34 PM
Here is the exact information for what this setting does

Quote from: Psych0fred
I've added a setting to the lua mission scripts that tells the AI the mission is urban.  This allows the AI to change some combat behaviors to be more suitable to an urban environment (for example, ATST will not move as much around during combat, since in a tight urban setting they will collide with walls too much).
I've added the setting to all current lua files, so you will only need to add it to any new lua mission files you create:
SetUrbanEnvironment("true")
or
SetUrbanEnvironment("false")
I've renamed the script function, "SetUrbanEnvironment" to "SetDenseEnvironment" since I realized with Endor that I wanted the AI vehicles to behave in the same way in forested environments as in city environments.  The new function name generalizes the environment type better.  I've updated all the lua scripts with this new function name.
EhPortal 1.34 © 2025, WebDev