Sniper range

Started by Zelenium, April 11, 2024, 05:41:23 PM

Previous topic - Next topic
Hey!
I decided to increase the range of the snipers, however I was unsuccessful.
The thing is that a standard sniper rifle can shoot at 300 meters. However, AI snipers use a maximum of 60-70 range and this is clearly exaggerated figures.
I wanted to fix this and did the following:

Lua:
SetMemoryPoolSize("Aimer", 999)
SetDefenderSnipeRange(200)
SetAttackerSnipeRange(200)


Weapon:
MinRange        = "32"
OptimalRange        = "100"
MaxRange        = "200"
LockOnRange        = "0.0"
LockTime         = "0.0"
LockOnAngle        = "1.0"


Ordnance:
LifeSpan         = "0.10"
Velocity         = "2000.0"


But really it doesn't work. Snipers don't even try to shoot from long range.
I think the AI has a limitation written in the executable file.
Probably it can be around 50 meters (maybe 48), but I don't rly know.

Is there someone who can help me with this question? Maybe I've made a mistake somewhere?

April 14, 2024, 01:29:46 PM #1 Last Edit: April 14, 2024, 01:37:37 PM by Zelenium
So, I found out that the limit is very close to the value of 60.
Also, there is no limit if AI shoots at vehicles

Quote from: Zelenium on April 14, 2024, 01:29:46 PMSo, I found out that the limit is very close to the value of 60.
Also, there is no limit if AI shoots at vehicles

I think there are other AI commands that need to exist in the Lua script.

Play around with these:

AISnipeSuitabilityDist(number) -found in the Jabba's Palace scripts with value 30
SetAIViewMultiplier(number) - found in Dagobah scripts with value 0.35
SetTeamAggressiveness(team, value) examples: rep, cis, imp, rep, or 1 and 2 to represent team 1 and team 2
Never let a person named AnthonyBF2 touch your BF2.

Before I respond, I need to ask: is this question specifically for SWBF1, or was this for SWBF2 and you've put it in the wrong board?
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

Quote from: Giftheck on April 15, 2024, 06:33:06 AMBefore I respond, I need to ask: is this question specifically for SWBF1, or was this for SWBF2 and you've put it in the wrong board?

Yes, it's about Battlefront 1
I like the first game more

Quote from: AnthonyBF2 on April 14, 2024, 11:53:12 PMPlay around with these:

AISnipeSuitabilityDist(number) -found in the Jabba's Palace scripts with value 30
SetAIViewMultiplier(number) - found in Dagobah scripts with value 0.35
SetTeamAggressiveness(team, value) examples: rep, cis, imp, rep, or 1 and 2 to represent team 1 and team 2

Okay, thank you. Let's check:
AISnipeSuitabilityDist(number) - I have not found this command in the specified location (in the first game). Also, when added to my script, everything stopped working, indicating that this command is missing in the first Battlefront.
SetAIViewMultiplier(number) - The same result
SetTeamAggressiveness(team, value) - As far as I've noticed, the command doesn't affect the shooting range.

Moreover, commands
SetDefenderSnipeRange(1)
SetAttackerSnipeRange(1)

didn't give any results (what is rly weird).
I do my tests on the Bespin2 map

And one last important thing:
I think there must be something like INTEGER < 61 because bots shoot a little farther than 60.

Is there anyone here who has worked with the executable before? I would like to get your experience, if you don't mind.
I have some experience with executables, but I don't want to waste time learning what is already known.
I am interested in what areas have already been explored to shorten my search.

Most of those commands do not exist in SWBF1. The only one that does is SetTeamAggressiveness,.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

April 16, 2024, 11:06:57 AM #6 Last Edit: April 17, 2024, 11:56:37 AM by Zelenium
Just in case, I'll post my findings in the executable here (maybe someone could use it someday)

001548eA - I changed the value from 60 to any other and players cannot reload on his own anymore on the R key
I think it is related to the area of memory that stores a weapon's current ammo value

0002990 - Number (60), which has something to do with map processing, because changing this number leads to crashing at the map loading stage

000A2174 and 000A2190 - Numbers (59) related to sounds. Changing them made all the game's sound disappear

If you are using Cheat Engine, search the forum for the CheatEngine table for SWBF1.  You may find something there.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet