Page 2 of 2
Re: Commands in Tactical Combat
Posted: Wed Apr 11, 2018 10:27 pm
by thunderchero
I found this interesting for those how hate AI ships retreating.
Spocks-cuddly-tribble wrote: ↑Wed Apr 11, 2018 3:35 pm
The AI battle calculation (run or fight) seems to hide in sub_
479020, with the below codes initiating the fleet retreat:
Code: Select all
AUTO:00477B00 mov edx, 0Ah
AUTO:00477DED mov edx, 0Ah
If you change retreat to a different command such as evade at;
Code: Select all
0x771ed BA 0A -> BA 07
and
0x76f00 BA 0A -> BA 07
A single Ai ship will fight to death.... but if AI ships can use group command (more than 1 ship present of same Group ID) they will still retreat
note; this was very min/quick testing, but interesting results.
Forcing AI to ram instead of retreat?
Posted: Thu Apr 12, 2018 8:48 am
by Spocks-cuddly-tribble
Let's go deeper. In sub_478370 we find some nice retreat orders:
Code: Select all
AUTO:00478482 mov dword ptr [ecx+1FCh], 0Ah // non-combat unarmed
AUTO:00478563 mov dword ptr [ecx+1FCh], 0Ah // non-combat armed
AUTO:004785C8 mov dword ptr [ecx+1FCh], 0Ah // warships
Fun fact is that the codes here can only switch between retreat and the ram orders I listed above.
So let's give more teeth to AI by forcing the ram command:
Code: Select all
AUTO:004783C7 jnz loc_478590 -> nop // warships
0x777C7 -> 0F 85 C3 01 00 00 -> 90 90 90 90 90 90
AUTO:00478480 jge short loc_4784E4 -> jmp // non-combat unarmed
0x77880 -> 7D -> EB
AUTO:00478507 jnz short loc_478563 -> nop // non-combat armed
0x77907 -> 75 5A -> 90 90
EDIT:
thunderchero wrote: ↑Wed Apr 11, 2018 10:27 pmif AI ships can use group command (more than 1 ship present of same Group ID) they will still retreat
This option won't force Ram but might avoid Retreat of warships:
Code: Select all
AUTO:004785BC jle loc_4783E6 -> nop jmp loc_4783E6
0x779BC -> 0F 8E -> 90 E9
EDIT2:
Alternatively just change the warship retreat command to ram. This might leave the standard command selection intact, but still force warships to ram instead of retreat.
Code: Select all
AUTO:004785C8 mov dword ptr [ecx+1FCh], 0Ah // retreat warships -> set 09 ram
0x779CE -> 0A -> 09
This might also work with other commands like evade, but code switches at some points expect either retreat or ram. Not sure how this performs.
Re: Commands in Tactical Combat
Posted: Sun Apr 15, 2018 9:29 am
by thunderchero
Hi Spocks-cuddly-tribble,
I have been looking for the location for commands for each combat group. I know I am just missing it or blind
I presume you are selecting ram same as me due to it is a "safe" command for all groups? the main group issue being the support / non-combat group. Since all ship models have at least 1 phaser slot. we can add min ship stats to all support / non-combat ships to allow more "safe" options.
Example; if fast attack command "charge" was changed to "assault" Then we would have a safe "assault" command for all combat group for this concept preventing AI from retreating and still allow them to have a good fight.
Re: Commands in Tactical Combat
Posted: Mon Apr 16, 2018 9:36 am
by Spocks-cuddly-tribble
thunderchero wrote: ↑Sun Apr 15, 2018 9:29 amI have been looking for the location for commands for each combat group. I know I am just missing it or blind
Problem is there are different switch modes in different processing depths.
Special cases:
- vs. monster, station, minor ships, 3+ way battles (with allies?)
- non-combat group
- special checks for selected retreat and ram commands -> triggering of a new command selection loop with changed input values? e.g. at 477E79, 477EA7 & 477FD5
Some examples:
- loc_4784F0: non-combat(armed) vs. ships: assault, evade, retreat & ram
- 4786F5... : group commands vs stations
- ship vs. ship commands for groups 0-2 are taken from data fields ds:5905D4(fast), ds:590674(long range) and ds:590714(slow) via intricate index operations (special case: evade at 478863)
I presume you are selecting ram same as me due to it is a "safe" command for all groups?
No, I just adapted the default code switches at this point.
the main group issue being the support / non-combat group. Since all ship models have at least 1 phaser slot. we can add min ship stats to all support / non-combat ships to allow more "safe" options.
Non-combat group shouldn't be a problem due to the special code switches.
Just edit their special retreat / ram codes for your taste (or leave them alone).
Problem could be the special checks for selected retreat and ram commands -> triggering of a new command selection loop with changed input values? e.g. at 477E79, 477EA7 & 477FD5
Means if we change the retreat command to something other than ram, the code might miss some trigger point information, maybe with side effects like an infinite loop i.e. crash/freeze. So testing/verifying all possible combat constellations might be frustating/time-consuming.
Re:
Posted: Sun Jan 06, 2019 5:31 pm
by EnPhreg
thunderchero wrote: ↑Thu May 19, 2011 12:07 am
combat.mnu:
Note; description in combat.mnu only changes text in popup command window not tactical display on left.
that's right,
but how to change the headline for the tactical display on the left side?
i saw SCT's code for the descriptions, but each tactical display has also a headline.
so where this headlines are assigned to their command? find nothing in trek.exe near the data field SCT specified for assigning the descriptions.
but only a cosmetic problem.
note: in lexicon the headlines are located right next to their descriptions. index neighbours.
Re: Commands in Tactical Combat
Posted: Sun Jan 06, 2019 5:49 pm
by thunderchero
I can tell you where in trek.exe
at 4A8FF4 is start for code subsections
offset for tga file names start at 57EE44
Re: Commands in Tactical Combat
Posted: Sun Jan 06, 2019 6:05 pm
by EnPhreg
very good, thank you.
really hidden this tiny values.
in vanilla botf some headlines are wrong assigned.
time for some corrections.
Re: Commands in Tactical Combat
Posted: Tue Jan 08, 2019 11:44 am
by EnPhreg
i've noticed that in stbof.res are a lot more pictures for tactical orders, than used in the game.
from the previous posts i know that some in vanilla BotF unused tactical orders are already programmed and usable, like cloaking, which already has entries in the lexicon file. but all the other unused tactical orders only have pictures and no useable programmed code in vanilla BotF??
some of the unused tactical orders look very interesting.
Re: Commands in Tactical Combat
Posted: Tue Jan 08, 2019 3:43 pm
by thunderchero
There are many unused images and files in the stbof.res. I had a list of all the "not used images" at one time.
Re: Commands in Tactical Combat
Posted: Tue Jan 08, 2019 4:06 pm
by EnPhreg
yes, but are the not used tactical orders already implemented in BotF and useable or does only the pictures exists?
Re: Commands in Tactical Combat
Posted: Mon May 23, 2022 5:56 pm
by thunderchero
After testing new ship stats for MUM with Chris, it got me wishing we had option for "group" vs solo target
right now if you want to target the weakest ship, you have to solo target each ship.
But it was a great test combat, 10 fed heavy cruiser II vs 10 cardassain heavy cruiser II (with cloak)
battle took 25 - 30 turns and was a lot of fun changing up commands as he would change his.
btw Chris won as feds and as cards. last one I took feds and Chris only had 2 of his HC II that survived.
Tactical Combat - "group" vs solo target Option
Posted: Tue May 24, 2022 4:43 am
by Spocks-cuddly-tribble
thunderchero wrote: ↑Mon May 23, 2022 5:56 pmit got me wishing we had option for "group" vs solo target
right now if you want to target the weakest ship, you have to solo target each ship.
We have that (semi-implemented) as part of the broken/unfinished command ship feature:
Callahan wrote:By accident, I discovered how to set all ships in a group to target one enemy.
Center the enemy by right click.
Get your ships orders.
Now, double right click the enemy ship with HOLDING the second click, then target him by left click.
Release buttons.
If all enemies have boxes around repeat.
The other boxes will disapear on success and you will frag one damn enemy for good without having to single target all ships on him.
Just learned that you must have at least 1 ship for command and control for this to work.
This probably is a semi implemented feature to let the command cruisers coordinate attacks, as said in the ship descriptions.
viewtopic.php?p=4409#p4409
Warning
It's a bit buggy i.e. sometimes game can crash/freeze like with other interface bug shenanigans:
Callahan wrote:I discovered that you can "lend" commands from other ships in a battle.
Just click on your ship and move the mouse over another - even enemy - ship to use it´s abilities for your ship/group.
Advice: Don´t let Starbases do fancy things. Crashes combat.
Tactical cheating
Removing both 'jz' via nop should unlock the feature without command ship or station:
Code: Select all
004A543C cmp ds:Command_Feature_if_1, 0
004A5443 jz loc_4A537B
004A5449 call Command_Feature_target_GUI
004AC19D cmp ds:Command_Feature_if_1, 0
004AC1A4 jz loc_4ABFEF
004AC1AA call Command_Feature_target_GUI