editing zoom in view

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

The project derails and becomes a bit overwhelming, for both of us.... :wink:


@ read-race fix -> most important point -> needs more testing

- table deviation fix for ECM would semi-break UE compatibility (with no real benefit :?: ) -> TBA
- reducing ECM large (elliptical/large/many) to max 29 minors might fix issue -> nope :???:


@ ECM base updates

- AIFleetBuildupFix + (TBA)


@ Mod Name / Version

- tested version deviation ECM/ECMS for savegame compatibility -> no issue just 'version under test' has to be the same @ 58AE74 (48h)

But the issue can trigger MP error:

E.g. UDML or ECMS -> Launching BotF -> version is Ok. Starting/loading game -> version 'extended' by empsInfo

Host/client -> Launched BotF without starting/loading a game vs other player who has started/loaded another game before:

:arrow: 'A player with a different version of Birth of the Federation has attempted to join and has been rejected.'

Here is asm-fix:

Code: Select all

Set mod name/version at 57D304 initial_setup '0.0.0'  0x17B104 30 2E 30 2E 30 00 00 00

read trek.exe name/version instead of 'extended' registry-key

00493C8E           push  57D304
004D05AB           mov   edx, 57D304
0050DF96           push  57D304         
0050E0B6           push  57D304
0050E1CA           push  57D304
0050E26E           mov   ecx, 57D304
0050F5DF           mov   edx, 57D304 -> MP_different_version Fix

@ winmm/ddraw fullscreen/windowed proxy

- DxWnd directory lists both files for both options -> AIO uses full/winmm windowed/ddraw (or did I change this?)
- tested 'pseudo' game/turn lag deviation of fullscreen/windowed and winmm/ddraw -> nope pseudo deviations due to windows background tasks :mad:


@ sector sizes & zoom for different resolutions/larger maps (TBA)


@ larger maps

- min empire distances med(+small) too low (except spiral med) -> even with my + gal-size patch
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Wed Oct 12, 2022 2:55 pm The project derails and becomes a bit overwhelming, for both of us.... :wink:
agreed just trying to get a head start you keep forgetting ECM has 32 trek.exe's to edit.
Spocks-cuddly-tribble wrote: Wed Oct 12, 2022 2:55 pm @ read-race fix -> most important point -> needs more testing

- table deviation fix for ECM would semi-break UE compatibility (with no real benefit :?: ) -> TBA
- reducing ECM large (elliptical/large/many) to max 29 minors might fix issue -> nope :???:


EDIT;
I did some more testing on UDML
current release 50 new games no crashes
with read-race fix 50 new games no crashes
increased min empire distance 11 -> 20 and got 20% of new games crashed with readrace log. (only irreg would load all other types stuck in loop)
note; if you use command -n it will crash every time if you use starting seed from crash log.

I will keep testing no report = no crashes
Spocks-cuddly-tribble wrote: Wed Oct 12, 2022 2:55 pm @ Mod Name / Version

- tested version deviation ECM/ECMS for savegame compatibility -> no issue just 'version under test' has to be the same @ 58AE74 (48h)

But the issue can trigger MP error:

E.g. UDML or ECMS -> Launching BotF -> version is Ok. Starting/loading game -> version 'extended' by empsInfo

Host/client -> Launched BotF without starting/loading a game vs other player who has started/loaded another game before:

:arrow: 'A player with a different version of Birth of the Federation has attempted to join and has been rejected.'

Here is asm-fix:

Code: Select all

Set mod name/version at 57D304 initial_setup '0.0.0'  0x17B104 30 2E 30 2E 30 00 00 00

read trek.exe name/version instead of 'extended' registry-key

00493C8E           push  57D304
004D05AB           mov   edx, 57D304
0050DF96           push  57D304         
0050E0B6           push  57D304
0050E1CA           push  57D304
0050E26E           mov   ecx, 57D304
0050F5DF           mov   edx, 57D304 -> MP_different_version Fix
yeah I was just thinking about this the other day when I noticed MP game MPR++ vs Non-MPR++
This should not be possible due to MPR++ changes registry. :shock:
Spocks-cuddly-tribble wrote: Wed Oct 12, 2022 2:55 pm @ winmm/ddraw fullscreen/windowed proxy

- DxWnd directory lists both files for both options -> AIO uses full/winmm windowed/ddraw (or did I change this?)
- tested 'pseudo' game/turn lag deviation of fullscreen/windowed and winmm/ddraw -> nope pseudo deviations due to windows background tasks :mad:
I am confused, was there a question?

DxWnd Proxy
winmm/ddraw (only one or the other should be in install path at any given time)
dxwnd.dll (is a shared file both winmm/ddraw use the exact same file)
dxwnd.dxw (this file is the config file with 2 files with same name but are different)

these files can be found in "tools" folder if you have installed "tools"
default path, C:\botf\tools\dx proxy files
these files are only backups for switching between full and windowed.

there is 2 folder "windowed" and "fullscreen" each folder has full set of proxy files.
Spocks-cuddly-tribble wrote: Thu Sep 29, 2022 12:41 pm - includes AI code for *colvar.wtf "distance" values
what values are you suggesting?
is distance only value you change?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

thunderchero wrote: Thu Oct 13, 2022 8:22 amincreased min empire distance 11 -> 20 and got 20% of new games crashed with readrace log. (only irreg would load all other types stuck in loop)
note; if you use command -n it will crash every time if you use starting seed from crash log.
Nice hint, it should be a sporadic error in RToSInfo when relocating home systems. Since I want to increase this value, a fix is required.
BotF changes/modifies the loaded race.rst in each game via a index list based on a copy of the 'races in game bitmask' (created from the RToSInfo star IDs) in sub_4AEE80. The bitmask causes the readrace crash in sub_4AED90. -> 4AED50

thunderchero wrote: Thu Oct 13, 2022 8:22 amyeah I was just thinking about this the other day when I noticed MP game MPR++ vs Non-MPR++
This should not be possible due to MPR++ changes registry. :shock:
The error is only about the mod/version name read from the registry, not the directory or other changes (or changes MPR++ the mod version displayed in the opening screen?) Just cosmetic rendering changes (MPR++) vs default can work, unlike the 'space in dirctory name' MP problem.

thunderchero wrote: Thu Oct 13, 2022 8:22 amwas there a question?
Not anymore. I still get mouse lag issue after some crashes with winmm (need to reinstall to solve issue - recreating unzipped proxy doesn't help).
With ddraw proxy I don't get this, but it launches and terminates the game slower than winmm.
As told, due the windows 10 shenanigans, i observed pseudo turn-lag deviations testing windowed- vs fullscreen- proxy.
I only noticed AIO uses by default winmm for fullscreen and ddraw for windowed.

thunderchero wrote: Thu Oct 13, 2022 8:22 amwhat values are you suggesting?
is distance only value you change?
No further changes at all! -> 'includes' = patch is fine. In my tests AI did good.
Larger maps change the only needed value (longest map edge in the exe - default large/horizontal). It's the integer from my old post (float not needed).
This adjusts the *colvar.wtf "distance" feature for larger maps (vanilla file settings still good).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Thu Oct 13, 2022 10:02 am I still get mouse lag issue after some crashes with winmm (need to reinstall to solve issue - recreating unzipped proxy doesn't help).
I don't use fullscreen unless I am using 1920 x 1080

here is a new set of proxy files for fullscreen (created by latest version of DxWnd)
Fullscreen_proxy.zip
give them a try and let me know if they help.

edit;
also you might try remove proxy files from install path
open dxwnd from DxWnd/fullscreen to get dxwnd interface and start game from there to see if you still have mouse lag.
You do not have the required permissions to view the files attached to this post.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

thunderchero wrote: Thu Oct 13, 2022 12:16 pmgive them a try and let me know if they help.
Using new files didn't help.
No big deal, plenty of workarounds (launcher, ddraw proxy & re-installation).
Might be an OS issue when crashing, e.g. a changed setting or registry flag only used by winmm proxy (set during installation)?


I don't think we can fix readrace anytime soon. Many 'fixes' only led to other crash logs.... :evil:

But it's not that bad. Worst map with many minors plus extra starting systems maybe one out of 25 new games.
So just an easy/fast relaunch of BotF (with no other issues) to generate the next map.

I still intend to increase the minimum empire distances for some larger maps. :wink:

thunderchero wrote: Wed Oct 12, 2022 10:25 amis there any other patches you have ready for normal maps? (AIO versions)
AIFleetBuildupFix.patch? -> YES
large AI tweaks? -> NO (not for base version)
Minor Placement - Random Race IDs Fix? -> NO - for now (would increase average minors, but not good for UE edits) EDIT: But if already added - also fine.

+ All sector size settings for higher resolutions at your discretion


This tweak tested good so far, but not ready for final release:
AI_Invade_Minor_Fix.patch

Funny thing is the AI is quite unpredictable with RNG fix. Same map, sometimes quite good, other runs some empires get vanilla-ish stuck.
You do not have the required permissions to view the files attached to this post.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Thu Oct 13, 2022 3:19 pm No big deal, plenty of workarounds (launcher, ddraw proxy & re-installation).
Might be an OS issue when crashing, e.g. a changed setting or registry flag only used by winmm proxy (set during installation)?
here is registry set for compatibility
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

installer set flags; DWM8And16BitMitigation

if you have any other flags they were set previously and should be removed. (but on my tests the install overwrote/removed old flags before adding installer flags) But we both know windows tend to write flags as they see fit.
Spocks-cuddly-tribble wrote: Thu Oct 13, 2022 3:19 pm Funny thing is the AI is quite unpredictable with RNG fix. Same map, sometimes quite good, other runs some empires get vanilla-ish stuck.
agreed, I am getting a lot of mixed results on MUM with AI tweaks for large maps
That is why I asked about your values used in *colval.wtf :wink:
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

thunderchero wrote: Thu Oct 13, 2022 9:36 pm
Spocks-cuddly-tribble wrote: Thu Oct 13, 2022 3:19 pmRNG fix
agreed, I am getting a lot of mixed results on MUM with AI tweaks for large maps
I was referring to 'BotF Random Engine Fix for single player turn process': viewtopic.php?p=56905#p56905
When loading saved game and just pressing Turn BotF AI does allways the same. With fix you can get different games each time (expansion directions/ treaties). But AI getting stuck in some map positions will always be an issue....

In my first two tests with ECM large the AI did best.
T1 large ring & T8 large irregular, no minors each.
But still compared to vanilla it's doing nice.

Biggest issue is the AI takes very long breaks between each task (also diagnosed by Gowron) when it could invade many systems in a row.
thunderchero wrote: Thu Oct 13, 2022 9:36 pmThat is why I asked about your values used in *colval.wtf :wink:
It's a complex/inefficient code, one factor distance to the own homesystem. *colval.wtf 'distance' affects preference of closer systems (0=disabled).
So you could try higher values for secretive/xenophobic empires like Romulans. But feature impact is limited.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Thu Oct 13, 2022 10:19 pm I was referring to 'BotF Random Engine Fix
yeah I could not figure that one out. :???: but that is my normal now a days.

in MUM tests
same as you t1 and t5 tests and used -n
with patch
t1 I was most disappointed by very little subjugation of minors (200 turns) 30 system
without patch
subjugation about same (200 turns) 20 system

with patch
t5 had more subjugation (100 turns) 30 system
without patch
same subjugation (100 turns) 20 systems

I expected more system, but it was still much better.
not sure how to fix lack of early subjugation.

note;
t1 0 - 200 turns 15 min
t5 0 - 100 turns 30 min
I use a q-tip to hold down "T" button on keyboard :grin:

I will try to run t2-4 test with patch only tomorrow
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

thunderchero wrote: Thu Oct 13, 2022 11:22 pmt1 I was most disappointed by very little subjugation of minors
not sure how to fix lack of early subjugation.
Expected - depending on other patches used: MUM sets TTs needed for invasions to max IIRC? I told you about T1/low tech issues. :wink:
EDIT wrote:I suggested to you 'AI offensive ground combat strength +50% per difficulty level above 'simple': viewtopic.php?p=25733#p25733
Also make sure 'OB Check Fix for AI Invade/Harass Tasks' is set to lowest 'good' ratio 2:1 viewtopic.php?p=34120#p34120
This might help a bit. But MUM overrides some AI task switches for invade/attack, so this might be ignored?
Vanilla low tech AI declares war and attacks minors even with no (or low) chance vs OBs & defender ground combat. ECM AI waits for good numbers (=more minor members than subjugations). Same against major systems, slower but in the long run better. Last test turn 300 the T1 romulans had 53 systems.:up:

But AI tasks are very broken. Invading TTs go over 15 sectors while 10 (undamaged) TTs 3 sectors from target system stay with a 'repair' task (there is no repair for that kind of brain damage). Many ships not updated after invasions / keep the task many turns vs the taken system (but skip the attack). :???:

thunderchero wrote: Thu Oct 13, 2022 11:22 pmI use a q-tip to hold down "T" button on keyboard :grin:

Code: Select all

NAME: Using Strategic Timer as Time-Lapse Function (AI Diagnosis)
DESC: Launching BotF BEFORE setting the timer you must start/load any game (else crash)!
DESC: BEFORE saving games the timer must be set to 0 (else data corruption)!
DESC: Time-lapse until the next multiple of the timer setting (might start in options screen)
DESC: Turn-display -1 (1 is 0) so Timer 25 stops turns -> 1, 26, 51, 76, 101...
AUTHOR: Spocks-cuddly-tribble / thunderchero's Q-tip
URL: 

>> 0x000b9051 64
>> 0x000b917b 74
>> 0x000b9255 8b 15 5c 30 59 00 85 d2 75 61 8b 0d 64 30 59 00 85 c9 7e 5d 8d 59 9c 89 1d 64 30 59 00 81 fb f8 11 00 00

<< 0x000b9051 01
<< 0x000b917b eb
<< 0x000b9255 a1 18 29 5a 00 90 8b d0 c1 fa 1f f7 3d 7c 2b 5a 00 90 83 fa 00 74 4f e8 af e2 f9 ff eb 48 90 90 90 90 90

#004B9C50     B8 01000000    MOV EAX,1   ; delay

#004B9D7B     EB 17          JMP SHORT 4B9D94  display_turn_number

#004B9E55     A1 18295A00    MOV EAX,DWORD [5A2918]  turn number
#004B9E5A     90             NOP
#004B9E5B     8BD0           MOV EDX,EAX
#004B9E5D     C1FA 1F        SAR EDX,1F
#004B9E60     F73D 7C2B5A00  IDIV DWORD [5A2B7C] gameInfo_2A4_strategic_timer
#004B9E66     90             NOP
#004B9E67     83FA 00        CMP EDX,0
#004B9E6A     74 4F          JE SHORT 4B9EBB     render
#004B9E6C     E8 AFE2F9FF    CALL 458120         end turn
#004B9E71     EB 48          JMP SHORT B9EBB     render
#004B9E73     9090909090     NOP
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Fri Oct 14, 2022 1:11 am
thunderchero wrote: Thu Oct 13, 2022 11:22 pmt1 I was most disappointed by very little subjugation of minors
not sure how to fix lack of early subjugation.
Expected - depending on other patches used: MUM sets TTs needed for invasions to max IIRC? I told you about T1/low tech issues. :wink:
You are right it was my TT patch, I reset values and it is doing much better now on low techs.

as for MUM how many system AI has, I should not expect as many as ECM. MUM has half as many sectors

ECM large 52 x 39 = 2028
MUM large 48 x 24 = 1152

here is how full it is on t1 start (cardassian with 39 systems they just took 5 klingon systems))
test.jpg
in my one of my tests romulans had 42 system after 220 turns
Spocks-cuddly-tribble wrote: Fri Oct 14, 2022 1:11 am
thunderchero wrote: Thu Oct 13, 2022 11:22 pmI use a q-tip to hold down "T" button on keyboard :grin:

Code: Select all

NAME: Using Strategic Timer as Time-Lapse Function (AI Diagnosis)
DESC: Launching BotF BEFORE setting the timer you must start/load any game (else crash)!
DESC: BEFORE saving games the timer must be set to 0 (else data corruption)!
DESC: Time-lapse until the next multiple of the timer setting (might start in options screen)
DESC: Turn-display -1 (1 is 0) so Timer 25 stops turns -> 1, 26, 51, 76, 101...
AUTHOR: Spocks-cuddly-tribble / thunderchero's Q-tip
URL: 

>> 0x000b9051 64
>> 0x000b917b 74
>> 0x000b9255 8b 15 5c 30 59 00 85 d2 75 61 8b 0d 64 30 59 00 85 c9 7e 5d 8d 59 9c 89 1d 64 30 59 00 81 fb f8 11 00 00

<< 0x000b9051 01
<< 0x000b917b eb
<< 0x000b9255 a1 18 29 5a 00 90 8b d0 c1 fa 1f f7 3d 7c 2b 5a 00 90 83 fa 00 74 4f e8 af e2 f9 ff eb 48 90 90 90 90 90

#004B9C50     B8 01000000    MOV EAX,1   ; delay

#004B9D7B     EB 17          JMP SHORT 4B9D94  display_turn_number

#004B9E55     A1 18295A00    MOV EAX,DWORD [5A2918]  turn number
#004B9E5A     90             NOP
#004B9E5B     8BD0           MOV EDX,EAX
#004B9E5D     C1FA 1F        SAR EDX,1F
#004B9E60     F73D 7C2B5A00  IDIV DWORD [5A2B7C] gameInfo_2A4_strategic_timer
#004B9E66     90             NOP
#004B9E67     83FA 00        CMP EDX,0
#004B9E6A     74 4F          JE SHORT 4B9EBB     render
#004B9E6C     E8 AFE2F9FF    CALL 458120         end turn
#004B9E71     EB 48          JMP SHORT B9EBB     render
#004B9E73     9090909090     NOP
I will try it out but Q-tip is easier lol
You do not have the required permissions to view the files attached to this post.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

thunderchero wrote: Sat Oct 15, 2022 10:22 amYou are right it was my TT patch, I reset values and it is doing much better now on low techs.
ECM uses a middleground:

- Fixed AI Fleet shields/hull vs OB firepower check - 'good' ratio 2:1 (other MUM edits might skip this code?)
- Fixed ground combat chance check - min 75% (1.75 : 1) - max TTs 7:1 (other MUM edits might skip?)

TT ground combat check low enough for T1 and still OK for T8. Vanilla min 'would be' (broken code) min 25% (0.75 : 1)
In my latest tests T8 AI used e.g. 1 'ok' cruiser per OB & 3-5 TTs vs a small minor (failures rare depending on RNG).
Best would be a dynamic min limit (increased once better TTs available). :idea: But might cause extra turn lag + work.

thunderchero wrote: Sat Oct 15, 2022 10:22 amhere is how full it is on t1 start (cardassian with 39 systems they just took 5 klingon systems)
in my one of my tests romulans had 42 system after 220 turns
Nice! Without further AI analysis and/or external hook by Flocke this might be as good as it gets. :up:

thunderchero wrote: Sat Oct 15, 2022 10:22 amI will try it out but Q-tip is easier lol
Yes, but the millennials want the borrowed q-tip back (sharing economy)....:wink:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Sat Oct 15, 2022 11:58 am Nice! Without further AI analysis and/or external hook by Flocke this might be as good as it gets. :up:
while testing MUM I noticed a bad pattern, so I test ECM also (I looked at 2 sets of saved games and both was same)

when a system is subjugated or membered main structures upgrade get messed up

if structure matches controlling race, AI is able to upgrade that structure Type 1 Hydroponic Farm -> Type 2 Hydroponic Farm

but if current structure does not match AI will add more of current type and tech level but not upgrade to next tech advancement.
bug.jpg
what is funny UE will show the structures that will not upgrade "can be built = NO
but it says same thing when minor is in control. :razz:

Edit;
vanilla limited tests, AI would upgrade food and industry of other races but structure would remain the same name.

I expect it is one of the patches both ECM and MUM uses just not sure what patch it is yet

will test more tomorrow

found the patch viewtopic.php?f=3&t=3471#p46492
"Automatic" Build function - Upgrade foreign structures bug fix
when removed AI is able to upgrade
You do not have the required permissions to view the files attached to this post.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

thunderchero wrote: Sat Oct 15, 2022 10:04 pmif current structure does not match AI will add more of current type and tech level but not upgrade to next tech advancement.

vanilla limited tests, AI would upgrade food and industry of other races but structure would remain the same name.
Thanks for testing the "Automatic" Build function - Upgrade foreign structures bug fix: viewtopic.php?p=46492#p46492
So it 'partially' works (not upgrading to invalid tech levels). :wink:
Removing the fix will reintroduce the default issue ignoring tech levels (e.g. T1 AI / automatic-function player can always upgrade to T9 buildings). :dwn:


Here is another AI task fix:

Code: Select all

NAME: AI Rapair Task Fix (damaged ships only)

>> 0x00034a46 94
>> 0x00034a4d 46
>> 0x00034a4f 39 d0 7d 2b 89 c2 8b 9c 24 a8 00 00 00

<< 0x00034a46 9c
<< 0x00034a4d 56
<< 0x00034a4f 33 c0 3b d3 0f 8d 01 01 00 00 8b c2 90

The lazy AI uses max 2 TTs for bldBase Tasks even with plenty of unused TTs in same sector:

Code: Select all

0041DD74           cmp   word ptr [esp+13Ah], 1            ; 0x1D17C max 2 TTs for bldBase -> 8 for max 9
0041DD7D           jbe   check_add_more_TTs
And max 3 destroyer for each raid tasks:

Code: Select all

00434395           cmp   word ptr [esp+16h], 3             ; 0x3379A  max 3 destroyer raid -> 9 (vanilla max task force size)
Last edited by Spocks-cuddly-tribble on Mon Oct 17, 2022 1:02 pm, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7969
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: editing zoom in view

Post by thunderchero »

Spocks-cuddly-tribble wrote: Sun Oct 16, 2022 10:26 am [EDIT3]: This should prevent AI file issues when AI ships change ownership:

Code: Select all

00407066           mov   eax, [eax+4]                      ; clear ship task next 0x6468 (04 -> 02)
Flocke wrote:set to attack system when I changed ownership. Not only has it still the system attack command set, but with all ships removed it was still listed in AIShpUnt, AgtSh2 and TskSh2.
Just that turn moved to some owned system with active orbitals and got lost given the system attack command was still active. It wasn't properly removed thereafter but left some broken agent references
while testing MUM I would get a repeatable crash, when I ran debug code failed at 00407076
when patch above was removed game was able to continue.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1962
Joined: Sun Apr 27, 2008 2:00 am

Re: editing zoom in view

Post by Spocks-cuddly-tribble »

Thanks for reporting this. I removed the suggestion from my post.
This AI code is awful to analyse, but I identified a lot of useful stuff. So we might be able to fix some AI task breaks after invasions. :wink:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.

Return to “General Modding Information/Questions”