April 20, 2024, 04:47:01 AM

Username
Password

Pages: [1]   Go Down
Print
Author Topic: Maximum limit of AI controlled troops?  (Read 9884 times)
0 Members and 1 Guest are viewing this topic.
cuthalion
Campaign Creator
*
Offline Offline

Posts: 385


View Profile
« on: June 05, 2015, 09:05:24 AM »

Hi, I encountered a strange bug while I was editing mission B3_07 in my new campaign.
The mission would not load, I checked .arm, I double checked .btb, I checked .ctl - everything looks in place.

I figured out the problem is as follows: When more than 15 enemy regiments are loaded into mission, Dark Omen crashes at mission start: If I change several regiment Ids in .arm file so that they are in .arm file but are not loaded in .btb, and overall loaded regiments is less than or equals to 15, the mission starts and works alright. If I add just 16th regiment, it crashes again.

It is double strange as in Chaos Dwarves I have 20 AI controlled regiments in the same mission and everything works properly.

Maybe I forgot something? I cannot find or recall a place where this limit can be set. But definitely 15 should not be a limit.
Please help.
« Last Edit: June 05, 2015, 09:19:23 AM by cuthalion » Logged
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #1 on: June 05, 2015, 12:17:58 PM »

I assume you added more "circles" to the BTB file?
Iirc you have to increase the size specifier of that Chunk. Have to check this at home.
It should be the amount of entries + no idea. Just a high number Wink.
Logged

cuthalion
Campaign Creator
*
Offline Offline

Posts: 385


View Profile
« Reply #2 on: June 05, 2015, 01:11:44 PM »

I added more 'subrecords' in btb, yes. It is a common thing and I have been doing it for hundreds of times Smiley
I always increase the counter in corresponding field, and by itself it never crashed the game. If I forget to increase counter, I just do not see troops I should have seen.
But here is a different situation:

Imagine I have 18 regiments in .ARM file.
If I change unit_id for ANY 3 of them to invalid (for example I set 240 instead of 140, 238 instead of 138 and 230 instead of 130), the mission loads just fine. This means, that any one of those 18 units is valid and does not bug by itself. It has btb entry, ctl script, nothing crashes, mission works alright.

But if I add more than 15, misson does not start. This is the first time I see such crap: Even original campaign has missions with more than 15 enemy units. I suspect that either I forget that something has to be updated or I don't know what Sad
« Last Edit: June 05, 2015, 01:21:46 PM by cuthalion » Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #3 on: June 05, 2015, 03:21:11 PM »

Are the enemy xslots or originals? Could you test using originals if this is the case please.
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
cuthalion
Campaign Creator
*
Offline Offline

Posts: 385


View Profile
« Reply #4 on: June 05, 2015, 04:02:27 PM »

It was xslots. I tested it with original armies and it does not work either.
Also, I have a mission with >15 armies fully taken from xslots and it works fine.

I assume there might be a problem in CTL or BTB. This was one of few missions where I rewrite CTL from scratch. but the problem is hidden too deep to comprehend: As I said, if I exclude any 3 units from the armies list (I tried different combinations) remaining 15 units behave exactly according to CTL instructions and BTB positions.

A question to developers: Is it possible to use debugging tools to track down what exactly crashes the game? I can provide savegame and position. It is very important for me to know because this unknown problem puts the whole campaign in danger Sad
Logged
olly
Global Spokesperson
*
Offline Offline

Posts: 2272



View Profile
« Reply #5 on: June 05, 2015, 05:25:39 PM »

Sounds like you will have to rewrite that particular CTL unfortunately, if all your other ones work. Have you tried creating a text file called Trace.txt in main Dark Omen\PRG_ENG folder, that logs all the files and their locations (Thanks Ghabry - use my EngRel.exe from download mod folders).
Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
cuthalion
Campaign Creator
*
Offline Offline

Posts: 385


View Profile
« Reply #6 on: July 17, 2015, 03:04:00 PM »

Hi, I encountered a strange bug while I was editing mission B3_07 in my new campaign.
The mission would not load, I checked .arm, I double checked .btb, I checked .ctl - everything looks in place.

I figured out the problem is as follows: When more than 15 enemy regiments are loaded into mission, Dark Omen crashes at mission start: If I change several regiment Ids in .arm file so that they are in .arm file but are not loaded in .btb, and overall loaded regiments is less than or equals to 15, the mission starts and works alright. If I add just 16th regiment, it crashes again.

An update to this information. I added 1 more player-controlled regiment in BTB file - 11th.
The game crashed even though it did not before. It looks like the bug occurs if there are >25 Total units ready to be deployed in this mission. It allows 10mine+15enemy or 11mine+14enemy. (I cannot deploy 11th unit but it is enough that there are 11 in my mission roster).
Even though it is still strange as there are a lot of missions in default and my custom campaigns where there are >25 total units, still it might help someone to understand why the bug occurs in this particular mission: B3_07 in wood-elf campaign.
Logged
Pages: [1]   Go Up
Print
Jump to: