Author Topic: is there a way for ai to use vehicles after their reinforcements drops below 25  (Read 324 times)

wsa30h

is it possible to force ai to use vehicles even if there reinforcements is less than 25 just like in battlefront 2 ?

Ascertes

  • Casual Map Maker
  • Master Modder
  • Frequent Poster
  • ***
  • Posts: 343
  • I like making maps, I guess...
  • Awards For those who play any version of the 2016+ EA games Special Award for those that play the original SWBF Special Award for those that play SWBF2
    • View Profile
    • Awards
I'm pretty sure there's an LUA command you can add to your script so the AI won't get out of vehicles once they're inside. I don't know if there's a way to get them to continue to get inside of them though once the reinforcement count hits that critical point.
"Birth, pain, fear, death; the cycle of existence." -Dread Master Calphayus.

SWBF1 Maps: Tatooine: Mos Anek, Kashyyyk: Village, Naboo: Province, Tatooine: Gulch.

SWBF2 Maps: Space Carida.

wsa30h

thanks ascertes this might or might not be hard coded

Dark_Phantasmagorical

  • The Official Ghost
  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1174
  • Awards SWBFspy SWBF1-Player of the Month To recognize Modders that make a most excellent contribution within the Month A member of the winning team of ICW6 Administered events in ICW5 A member of the winning team of ICW5 Special Award for those that play the original SWBF ICW4 Participant Recognizes someone who most generously donated funds to the site or the site ICW3 Participant
    • View Profile
    • The BOBclan
    • Awards
  • PSN: phantom567459
  • Steam ID:
  • Origin ID: phantom567459
It's a hard coded command in BF1.  See here (this was in an advanced modders topic that I thought I cross posted but didn't):

Found both the Hero Death and the AI getting out of vehicles.

How I did this:  I attached the CE debugger to the reinforcement counts.  I had to check every code that accessed them (only about 10-12 I think), and NOP them one by one, reactivating code that didn't affect my tests (except the 25 reinforcements - it tipped me off by the direct reference to 25)

Code: [Select]
Battlefront.exe+17CEAB - Disables check for hero - I and hero don't respawn at/under 20 reinforcements
-->Line 17CEA0 - Change 8B 48 14 to 90 90 90 (NOP)

Code: [Select]
Battlefront.exe+1396C6 - Disables check for 25 reinforcements (get out of vehicles)
-->Line 1396C0 - Change 83 7A 14 19 to 83 7A 14 00  (changes check from 25 to 0)

These should both work by hex editing your exe.

edit: aka I'd totally prefer if you added these directions to your mod if it's so essential, rather than releasing another exe.  ggctuk uses these for his full conversion, but asking people to replace their exe for mods other than a full conversion (or online fix) is not a great idea.
« Last Edit: December 03, 2019, 11:23:43 AM by Dark_Phantasmagorical »
The BOBclan:  A Rich History


'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

wsa30h

how do i add this to my mod witout editing the exe ?

Dark_Phantasmagorical

  • The Official Ghost
  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1174
  • Awards SWBFspy SWBF1-Player of the Month To recognize Modders that make a most excellent contribution within the Month A member of the winning team of ICW6 Administered events in ICW5 A member of the winning team of ICW5 Special Award for those that play the original SWBF ICW4 Participant Recognizes someone who most generously donated funds to the site or the site ICW3 Participant
    • View Profile
    • The BOBclan
    • Awards
  • PSN: phantom567459
  • Steam ID:
  • Origin ID: phantom567459
Hard coded = you must hex edit the exe (or attach a trainer).

There is no other way.  My suggestion was to supply my directions on the locations in the hex editor.
The BOBclan:  A Rich History


'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

wsa30h

silly question what do i do in the hex editor is it a floatvalue a hex value ? what do i replace with what basically dumb it down for me please

Dark_Phantasmagorical

  • The Official Ghost
  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1174
  • Awards SWBFspy SWBF1-Player of the Month To recognize Modders that make a most excellent contribution within the Month A member of the winning team of ICW6 Administered events in ICW5 A member of the winning team of ICW5 Special Award for those that play the original SWBF ICW4 Participant Recognizes someone who most generously donated funds to the site or the site ICW3 Participant
    • View Profile
    • The BOBclan
    • Awards
  • PSN: phantom567459
  • Steam ID:
  • Origin ID: phantom567459
Battlefront.exe+1396C6 = go to line 1396C0 in your hex editor, and find 83 7A 14 19 (in hex) and change the 19 to 00.
In hex, 19 = "25"
You are telling the game to execute the check at 0 instead of 25.
The BOBclan:  A Rich History


'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

wsa30h

thanks that worked also is there a way to add more local factions in the exe ?

Dark_Phantasmagorical

  • The Official Ghost
  • Administrator
  • This Man Has No Life
  • *****
  • Posts: 1174
  • Awards SWBFspy SWBF1-Player of the Month To recognize Modders that make a most excellent contribution within the Month A member of the winning team of ICW6 Administered events in ICW5 A member of the winning team of ICW5 Special Award for those that play the original SWBF ICW4 Participant Recognizes someone who most generously donated funds to the site or the site ICW3 Participant
    • View Profile
    • The BOBclan
    • Awards
  • PSN: phantom567459
  • Steam ID:
  • Origin ID: phantom567459
It's not that easy.  The exe stuff I do is all related to modification/removal, not addition.  Theoretically there are ways to add content, but they are well beyond my knowledge at this point
The BOBclan:  A Rich History


'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

wsa30h

oh ok thanks for all the help if you ever figure out how to add extra stuff such as adding extra local factions so that the game can differentiate between team 3 and 4 let me know.

Led

  • Administrator
  • The Chosen One
  • *****
  • Posts: 7281
  • The 82nd Element
  • Awards For those who play any version of the 2016+ EA games Special Award for those that play the original SWBF
    • View Profile
    • Awards
  • Steam ID:
  • Tunngle ID: _PLA-Led
  • Origin ID: plaled
oh ok thanks for all the help if you ever figure out how to add extra stuff such as adding extra local factions so that the game can differentiate between team 3 and 4 let me know.

I'm pretty sure we have already said items can't really be added through hex editing...I won't say impossible, but it takes a level of understanding of the compiled code and computer memory that few people have knowledge of...and for SWBF1, I think few means zero.

But you are welcome to try and report back to me when you get it to work.  ;)
Don't believe everything you read on the internet

wsa30h

perhaps phys0fred would know ?