SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: wsa30h on December 01, 2019, 06:28:35 AM

Title: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 01, 2019, 06:28:35 AM
is it possible to force ai to use vehicles even if there reinforcements is less than 25 just like in battlefront 2 ?
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: Ascertes on December 02, 2019, 10:30:37 PM
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.
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 03, 2019, 02:48:28 AM
thanks ascertes this might or might not be hard coded
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: Dark_Phantom on December 03, 2019, 07:40:19 AM
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):

Quote from: Dark_Phantasmagorical on November 11, 2017, 05:36:39 PM
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)

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)


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.
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 03, 2019, 09:42:39 AM
how do i add this to my mod witout editing the exe ?
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: Dark_Phantom on December 03, 2019, 09:52:00 AM
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.
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 03, 2019, 10:29:04 AM
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
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: Dark_Phantom on December 03, 2019, 11:22:13 AM
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.
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 03, 2019, 11:45:33 AM
thanks that worked also is there a way to add more local factions in the exe ?
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: Dark_Phantom on December 03, 2019, 12:39:31 PM
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
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 03, 2019, 12:48:37 PM
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.
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: Led on December 03, 2019, 12:51:26 PM
Quote from: wsa30h on December 03, 2019, 12:48:37 PM
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.  ;)
Title: Re: is there a way for ai to use vehicles after their reinforcements drops below 25
Post by: wsa30h on December 03, 2019, 01:11:03 PM
perhaps phys0fred would know ?
EhPortal 1.34 © 2024, WebDev