Jump to content

Anyone have this bug before and how to fix it?


Recommended Posts

Posted (edited)

Hi,

I was doing a test on Atreides Map 9.1 and I Noticed something strange, The Emperor will rebuild his buildings when destroyed, but the Harkonnen will not?

All the AI settings are the same, I even removed the Fremen from being used by Harkonnen, but nothing works, they just sit there and don't rebuild. All settings say they should and mimic the Emperor, is this a bug or something?

Has anyone else had this bug and is there a fix?

Thanks,

Edited by firefly101
Posted (edited)
1 hour ago, firefly101 said:

Hi,

I was doing a test on Atreides Map 9.1 and I Noticed something strange, The Emperor will rebuild his buildings when destroyed, but the Harkonnen will not?

All the AI settings are the same, I even removed the Fremen from being used by Harkonnen, but nothing works, they just sit there and don't rebuild. All settings say they should and mimic the Emperor, is this a bug or something?

Has anyone else had this bug and is there a fix?

Thanks,

This is a list of possible reasons:

AI getting stuck trying to rebuild: Sometimes the AI gets stuck because it tries to place a 2x2 concrete, consider it has not enough room, and cancel the concrete; then he start building another 2x2 concrete, cancel, build, cancel... if you saved the game and you are using gruntmods use debug to change the control on the Harkonnen and see for yourself.

You can also use debug mode on the Harkonnen too see exactly what it is happening. Maybe the Ai has no money, or it tries to build certain building and were withouth money so enter the "hold"; this can happen mostly with the upgrades, as the AI don't care of the money it has or the settings of the AI so it will rush whatever upgrade available, if the starting money it's certain value may enter in "hold" and never cancel or try to re-do those upgrades.

If you are not using gruntmods, the only way I can think it's edit the mission and said that the player it's harkonnen and test the map; and once there, sell/destroy your own building/s so you can see what happens (keep in mind that saring control with the AI you can only give orders to your units 1 by 1).


You can also try to import a preexisting AI, the editor have a few templates; you can import one, place on the editor tons of units, hit the "test" buttom and destroy the Harkonnen and see if they can rebuild; if yes, then it has to do with your own AI. if not, could be anything from the previous lines I wrote. <-- after you have done with the test if you click on "reload" your map will return to how it was before appliying the changes.

Lately could be your mod itself, maybe the Harkonnen don't own the buildings... or maybe you forgo to give to it enough tech? No idea.
The best advice (if you are using gruntmods) it's using debug mode to take control on the AI everytime it does something weird, it's the best way to know what it's happening with it.

Edited by Cm_blast
Posted

Hello,

Ok I was able to add the debug to my mod, it overwrote my text file, but I can rename the stuff again. I checked out both houses. The Emperor rebuilds as normal. But the Harkonnen do not. There is no activity in the build queue at all only the building of units. Plenty of Money 12k+ when I delete the building they wont rebuild, but if I build for them, they start to build troopers again. I tried adding all upgrades for barracks back, no change, removed the fake concrete around the area, still no effect. I tried with and without the Palace, I copied the AI from the emperor to Harkonnen with no results still no rebuild.

In Mission 9.2 the Hark AI will not build the Barracks but will build the Hanger for the Ornithopters and the emperor will not rebuild barracks. Something buggy but I have not done anything that big to change the behavior this randomly. Maybe there is something buggy with the Queue patch exe? I once seen the AI produce none stop Units and send them to the player to attack, I still don't know what caused the issue, I just dumped the map I was working on when I seen that.

Posted

That sounds really bizarre. If you literally copied that AI and it's STILL not fixed... it sounds like the AI is somehow stuck.

My AIs have never given me trouble that wasn't my own fault, so I'm not sure what to say about this. @Cm_blast has more experience with fickle AIs that act strangely, I think.

Posted (edited)

Hi,

I just was able to do more testing and found later in the game after deleting all the stuff the AI is building then cancelling. I tried changing the Windtraps back to 2x3 foot print thinking this may be the cause but I am still have the problem. I cannot figure what the AI is trying to build but cannot place? The concrete is left over after the delete, but that shouldn't cause an issue. Could it be turrets or walls too close to the border causing this action. Its very destressing as the Emperor AI now does it, but still builds other buildings, but I am wondering if the close proximity to the map edge may be causing this bug?

The only things I changed was the removal of certain buildings using the -1 so they cannot be built, I also removed the ownership for them. I changed the tileset to allow clefts to be passable with infantry. and removed the availability of buying certain starport  units.

Really most of the time the AI is just sitting there without building anything and just stays that way, even though the have money. I wonder if changing the units to be less of price on the starport may help. Maybe the AI is SAVING up to buy the 99000 credit item? I'll let you know what I find as knowing what the limits of this engine is very useful. I am doing some things other mods don't so....

 

Edited by firefly101
Posted
36 minutes ago, firefly101 said:

turrets or walls too close to the border causing this action

Yeah, that can cause the AI to get stuck. :P

Try swapping ownership of the Emperor and Harkonnen forces on the map, see what happens?

Posted (edited)

Hi Fey,

Since I have been able to add the Debug to my game I have been using it. I tested out the startport theory, but it still didn't work. I decided to upload my game mod minus the movies, so the Z file is about 56mb, This way maybe someone would like to take a look and see if they can find out something I am missing. What I need to test is the vanilla version with the queue patch, to see if it does it, If it does then its something in the .exe. I already noticed that the Battle map in the main game doesn't show the territories taken in both the gruntmod or queue patch. So that is a bug that shouldn't be. You can see the map locations after, but while the voice is saying ordos took this etc, it shows nothing but a blank desert map and I tried all resolutions thinking maybe that was the cause but it wasn't.

Also I found a weird bug that when I set the mission to have 160+ units to attack they AI didn't always send that number even when they had the amount of units and the time to build them. So there are some bugs with the engine or AI, I watched them send 60 units and leave 100 on base just sitting there, but the 120+ area seems to work fine?

P.S. I just did some more testing this time taking the .exe from Gruntmod and using it. It made no difference. I also readjusted the base to be far away from the edge and that didn't do anything either. I did not the AI start to rebuild turrets, but then it did something weird and rebuilt them in one location next to each other, after about 5 of them were made, it went into the building and cancelled routine. I wonder if there is a vanilla issue that wasn't noticed with some of the maps. Each map seems to react differently on the AI behavior, maybe Tibed has some bugs I know its missing some of the sound slots for Hark and Ordos.

Edited by firefly101
Posted (edited)

The AttackBuildingStrength parameter is a percentage of total available units. If you want them to send everything, gotta set that to 100. There shooould be an AI manual included the with the editor! :) If that helps.

And yeah, TibEd has a bunch of issues. To mod the sound completely, you actually need to edit the hex. I posted details about it here:

https://forum.dune2k.com/topic/28668-regarding-unit-dialogue-modding/?do=findComment&comment=399758

Hope that helps.

Edited by Fey
Posted (edited)

Hi,

That explains some things on the attack build strength, but as you can see I haven't modded a lot in the msi files, more just to restrict certain units or buildings like the ones I removed.

Well the manuals are in Docx format my MS word cant read them. I need to use that online converter to convert them which I plan to do now.

I did do some more testing, but this time I decided to use a clean Vanilla 1.06 version of the game, the only thing installed was the menu and debug. Vanilla .exe. what I FOUND out is VERY interesting. The AI did the same thing! The Emperor in that level built the barracks but the Hark only did it once, then stopped. Also it did not rebuild any of the other buildings I deleted. Mind you this was a VANILLA game, I did NO edits whatsoever.

I think what this means is the AI is messed up in this game, and someone needs to look into redoing the AI, as each map the AI behaves differently on what they rebuild or not. They may have done this on purpose thinking it would be too hard for the player if the AI rebuilt everything. Also the Practice AI may be different than the regular single player AI.

I think this is important as I confirmed that the vanilla was doing the same thing, so my changes cannot be the cause of the AI behavior completely. I am using this game on Winxp SP3.

Anyway some thoughts on this would be nice as you guys have more experience than myself. This may have been something that got overlooked as each map the AI will behave differently. Sometimes rebuilding then not, also I didn't notice this problem until I was testing with my Ornithopters, once watching them destroy the barracks and then them not rebuilding tipped me off on this one map, if I was watching the emperor I would have never caught it.

Edited by firefly101
Posted
2 minutes ago, firefly101 said:

the Practice AI

The practice AI is indeed different. It berserks if it thinks it can't continue the fight normally, and it builds up from scratch according to the order you set for it. Campaign AIs only rebuild what's been lost, assuming it doesn't get stuck.

The AI has ALWAYS behaved exactly like I've instructed it to, at least for me, so I'm inclined to think there's something off about the setup rather than the AI. There's a lot to understand about it, it's more likely that this behavior is predictable somehow and there's something we're missing. I'd have to take a look.

If you want to build a new AI, I put together some details along with Cm in the AI manual, but I could also give ya some quick tips here. I customize the AI on each mission, and my S18 AIs are notably among the most brutal, if not the most brutal created for the game. S18 is notably the most technically complex map ever created for D2k. The AIs on the level don't use gimmicks like infinite reinforcements to make up the bulk of their armies; they're set up in a very specific way to be incredibly obstinate. However, it sounds like you're modding the original campaign maps for the most part, so perhaps it's not something you'd be interested in, unless you feel like customizing a new AI for those old maps. Which could be pretty fun! :)

Posted (edited)

Yes I would be interested. I always like to make the AI more challenging. If you already have the experience I can only benefit from it, 🙂 I do think there is something going on as the Vanilla maps without editing are not behaving properly with the rebuilds. I was using the standard 1.06 and it still had issues, tried using Gruntmods and the Queue Patch exe's and get similar results. I noticed on the vanilla map the AI tried to build a couple buildings but after that didn't do them. Maybe something with Building priorities is causing this or an order of some sort. Is there any other AI files besides what we can edit, I read the manual and there is still a lot of known things about this.

 

P.S. Will your S18 AI work with an all infantry version?

Edited by firefly101
Posted (edited)
2 hours ago, firefly101 said:

Yes I would be interested.

Well, there are some specific things you might want to look at:

Spoiler

 - Build rates. How frequently the AI produces new units, if possible. Note: If the AI has a delay that finishes just before that new unit is trained, but can't train anything else, it will go on cooldown again, so a higher number may actually be faster depending on how the timing works out. If you want constant production, set it to 1.
 - Attack building delays. For a harder AI, give it a long enough delay that the AI can build up its forces and the player has the chance to potentially attack, but short enough that the player doesn't get too long to rest between enemy attacks. Multiple AIs can have synchronized building attack delays either for massive attacks at once, or for more rapid but still strong attacks.
 - Unit assignment ratios, like AttackBuildingStrength. Set that really high for some strong attacks, but don't forget to give the AI some response to Harvesters or base structures under attack. You can use reinforcement drops set to "Retreat" to give the AI more unassigned units to use.
 - Attack building priorities. Mess with them to make the AI focus on different structures, or set them all to zero to make the AI send attackers after the nearest unit.
 - The GGS switch. Set to zero and the AI won't bother guarding its base. This may be called 'unknown byte 29,' at least I remember it being 29, but I know it as the GGS switch. This can be useful for certain behaviors.
 - Repair values. This is more important if vehicles are involved, since they can be sent back to the Repair Pad sooner, but at least change them for structures. Boost 'em up to 0.999 and the AI will begin repairing buildings the instant they're damaged.
 - BuildRatios. If you create a practice AI, BuildRatios and the related MaxBuildings parameters are how you tell it exactly what to build, in what order. There should be notes about calculating this in the manual, but it's really quite simple: If you make the AI want three Wind Traps and give Wind Traps a ratio of 10, the second Wind Trap will be built at ratio 5 and the third will be built at ratio 3.3 repeating. Structures are built according to whichever has the next highest ratio. A good build order means your AI is a more valuable ally or a tougher enemy.
 - UnitBuildPriorities. These are just for giving your AI a focus on certain units. If you want your Harkonnen AI to build Troopers only, set Light Infantry to zero and put Troopers anywhere above zero. Easy.
 - ProtectUnit. You don't need to use these only for Harvesters! Let's say you give a Harkonnen AI the inclination to build only Troopers. Well, if you place any Light Infantry on the map, which that AI will never train from the Barracks, those would be perfect for guarding if you set the ProtectUnit to 1 on them. That way, the AI will send forces to assist the unit under attack just like it would if you were to attack one of their Harvesters.

These are some general tips for boosting AIs' strength. Regarding the S18 AIs in particular, they are set up specifically for the map, which is of course how I get them so tough! But, here are details on how exactly that setup is achieved:

Spoiler

There are only eight spots. One is the player, another is his ally at the start of the game, and the other six sides make up the enemy forces:
 - Two primary AIs.
 - Two secondary AIs.
 - A tertiary berserk AI for special events.
 - One side that doesn't have an AI, but is on their side anyway. This prevents the game from crashing due to the number of structures this AI uses, and also allows sandworms to be used normally on the map (with the exception of the force-fire glitch, which isn't that big a deal)

The side without an AI has a massive wall of Rocket Turrets which the player is meant to blow through using captured Storm Lasher megaturret technology. This is the only time during the campaign the player may build the megaturrets.

The tertiary berserk AI is used at the beginning and end of the map, first to send a massive attack the player's way and eliminate his ally, then at the end as part of the king-of-the-hill section, attacking the player's SLashers as they blow through the RT wall.

The secondary AIs are spread, one on the west side of the map and another on the east. They're there explicitly to centralize the defense of the primary AIs at the two different locations, rebuilding Autogun Turrets locally and providing very limited forces to assist the primary AIs on attacks. If the primary AIs were allowed to rebuild turrets at these bases, it would be terribly unfair as their ConYards are nowhere near, so consider these AIs there for balancing purposes. They are also the only AIs with special weapons, those being Saboteurs, due to the lack of ABPs on the primary AIs.

The primary AIs are the meat of the map. They have four bases across the whole map, two belonging only to themselves and two partially occupied by each secondary AI. Because of the way the map is set up, their first primary production structures will be closest to the player. When the player wrecks those structures, the next ones that become active will be in the next base in the player's path. They have more than three factories of each type, so their production speed is maxed. They have maxed build rates and their ratios are calculated for both a healthy mixture of units, and a setup that rarely results in delays through the AI going "I have too many heavy vehicles, I need to stop building heavy vehicles altogether until more infantry are trained." They have one Refinery at each base, so their income is extremely good. Their GGS switches are off, otherwise they would be in "I need to defend the base!" mode pretty much anywhere on the map and actually wind up being hyper aggressive. To compensate, they attack every six minutes and alternate, resulting in six minutes of building units at maximum speed for each AI, but only three minutes between attacks. Furthermore, as I mentioned earlier, the primary AIs lack ABPs, AttackBuildingPriorities, so they'll attack the closest whatever. If the player is defending his base, they will go on the attack. If the player is moving out and attempting to attack them, they will appear to pre-emptively defend themselves with just as much force. That force is 100%; they have an AttackBuildingStrength of 100, and thus will dedicate all available units to the attack. Other miscellaneous things, like unit and building repairs, are optimized. They get occasional reinforcements for free through their Starports, but this is extremely insignificant compared to their generic production and mostly helps them keep up as the player takes ground. Due to how their bases are set up, they only are set to rebuild turrets locally at their final bases, although they could be set to practice AI and make them rebuild everything, but only up to a certain maximum amount, so they'll only rebuild when the player gets to the bases where their ConYards are. They also have certain units they'd otherwise build spread out around the map on guard mode. The result of this is that their initial attacks consist only or mostly of certain basic units, like Combat Tanks and Missile Tanks. As the player blows through areas he'll really be inclined to clear out due to the pressure being put on him from those angles, he'll blow through those units on guard mode as well, making the AI think "oh, I don't have enough of that unit, I should build more of them." And then he'll start seeing more Sonic Tanks and Sardaukar being sent at him, the AI seems to adapt its strategies a bit. Finally, the bases tend to be set up in a way that rewards the player taking it apart with caution and some genuine strategic execution. Example below:
filtering.png
The obvious thing about this setup is that the player's units are filtered into a bunch of different paths, making them easier to pick off. The AIs' forces are funneled out into a surround on approaching enemies, and gather together. One of the strongest possible concaves (the formation where you form an arc around enemy units to get as many of your units firing on them as possible) involves heavy vehicles flanking infantry in the middle. The infantry represent extremely significant firepower while the armored vehicles screen them from being crushed and support with their own firepower. Under normal circumstances, two Gun Turrets and one Sonic Tank wouldn't be that scary... but, with this formation, you could feed fifty Combat Tanks to that defensive line and lose every single one before any of their factories go down. The player benefits massively from, say, using LRA to take out the Heavy Factories from below the cliffs, clearing out the walls with Siege Tanks or Grenadiers, or forming up beyond their defenses and awaiting their next attack before pushing in.

And then the enemy has a bunch of SLasher megaturrets of their own covering important ground, so each of those warrants microing a unit ahead of the others to act as a lightning rod while approaching it, or going after the power at a given base, or just straight-up nuking it with a Death Hand or something. Not to mention other neat new tech, like Shock Raiders or Flame Tanks.

So, there are a lot of factors that contribute to boosting the AIs' strengths. Something that the primary S18 AIs aren't set up for is attack timing through terrain. For example, if you want the enemy infantry and vehicles to reach your base at the same time to make the attack feel heavier and be more likely to be effective, you can put infantry-only paths between the AI and its expected destination, then have vehicles take a longer path around. Then, put the Light Factory in the back of the base so their light vehicles get there with closer timing to their heavy vehicles, or place dunes around because they slow light vehicles more than they do heavy vehicles, further equaling out the timing.

Anyway, I hope the examples I provided prove helpful at making your very own scary AI. Have fun getting stomped! :D

Edited by Fey
walls of text lol, i put them under spoilers so the post is less lengthy
Posted

Hello,

Yes it does help a lot, thank you for the Tips, this game is a learning experience for me since I haven't played with it for years. I was thinking, since you and others are making custom maps, maybe that is why it wasn't noticed as much on the vanilla maps having building issues? I know a lot of people seem to play MP also. I was surprised the Vanilla maps had similar problems as it meant its going to be harder to find out why the AI is not rebuilding right.

Posted (edited)

Well, you did lots of things for yourself, as I was about to suggest the "try with the unmoded game".

If at any other point you want to share a map, you can upload the ".map - .ini - .mis" file, which together are 110 Kbs only, quick to both upload and download and, although the mod it's not included, it is enough to me to open it with the editor, check the values and run a test in the "vanilla game" (gruntmods it's not exactly vanilla, but you get it). At least if it works, then it's for sure it's something on your mod, if it doesn't work, I can check internally why it happens (you can upload directly into the forum if you want).

4 hours ago, firefly101 said:

I was thinking, since you and others are making custom maps, maybe that is why it wasn't noticed as much on the vanilla maps having building issues? I know a lot of people seem to play MP also. I was surprised the Vanilla maps had similar problems as it meant its going to be harder to find out why the AI is not rebuilding right.

The only problem I found with the AI not building was mostly with turrets in corners-edges. I have a few missions where the AI lost a turret, try to rebuild it but because it doesn't have enough room for the 2x2 concrete (I guess), cancel it and try again.

If by now you still have the problem you may pass us the .map/.mis/.ini file for that level as you have it right now and I can check.

But it is true that the AI sometimes do weird things that I didn't realize until later, but by your description it's really weird what it happens.
Try another thing in the meanwhile. Not only importing the Emperor AI into the harkonnen, but slighlty alter some values, the attack rates, the unit build rate, the GuardGroupSize... just any other value, save and run the test.

I found once that I had problems with two Ais that were using the same AI, as on my early campaigns we didn't have access to full editing the AI so we used to import vanilla-westwood Ais into the missions; I remember importing one for both the Harkonnen and Atreides, and for some reason one of them were building likes 4 carryalls, instead the 1 carryall per ref (in a mission with only 1 ref, and even if the AI I imported had 2 carryalls per ref as setting; on my game that AI had more than 2).

At that moment I imported a different AI for that side, although again, it was an early thing and maybe I did something wrong... I barely have experience, but I found that odd since I was importing 1 specific AI into 2 sides but game was doing unexpected things.

Edited by Cm_blast
Posted
7 hours ago, firefly101 said:

maybe that is why

Aye, it's possible. We've kinda cracked everything wide open, and I imagine Westwood had extensive editing tools, but maybe not the ideal testing opportunities? Well, we still don't understand morale...

In any case, I recommend making a "default AI" you'd like to import on any mission for editing purposes. Like, mine has optimized repairs, a standard amount of Harvesters and Carryalls per Refinery, a specific Cash Stash setup below the Refinery's max Solaris storage, attack building morale at 100, and other stuff like that. Then you can leave stuff like unit / structure build ratios, build rate, assignment strength, attack frequency, etc. blank or with generic numbers so you can customize them more easily. The build ratios on my default AI are set to zero, but attack frequency is, like, 8 mins first attack, 5 mins for follow-ups, 5 sec buildrate...

If you'd like to have a look and see if you like it, here's the misai file. Just import this somewhere over something you'd like to edit and see about telling it to train some infantry.
ayy lmao.misai

If you like an AI and want to set it as your default, move it to your D2kEditor's config folder and replace the default AI there.

Posted

Thank you,

Btw I did some more testing and adjusted Max buildings for the Hark, 2 Barracks, refineries etc. And they AI started to rebuild the destroyed buildings again. Funny thing is the changes I made were only to the Hark, but the Emperor benefited from them and started rebuilding everything when destroyed. About the only thing that still have a problem was the windtraps for Hark, they only tried to rebuild them when they power was low, so maybe its some coded thing. But I also set the number higher to 13 because that is how many wintraps were placed. But I wonder if Max Buildings has a limit like 9 or something?

I would think that would be used only for MP Practice AI, but changing the Max to 0 causes the AI not build at all, so there may be some connection. I have tested it though and the AI was rebuilding Destroyed Barracks, Refineries, Outposts with no problems. I also noticed the AI likes SMALL bases, Large bases seem to cause weird AI behavior. I did make the base smaller, but when I tested it the Hark were still not rebuilding, but when I did the Max Building changes they started acting normal. I did notice the AI tends to rebuild more on destroyed buildings, than ones you just sell. So there must be some hardcoded AI stuff somewhere besides the stuff we are editing.

 

 

Posted (edited)
34 minutes ago, firefly101 said:

Btw I did some more testing and adjusted Max buildings for the Hark, 2 Barracks, refineries etc. And they AI started to rebuild the destroyed buildings again. Funny thing is the changes I made were only to the Hark, but the Emperor benefited from them and started rebuilding everything when destroyed. About the only thing that still have a problem was the windtraps for Hark, they only tried to rebuild them when they power was low, so maybe its some coded thing. But I also set the number higher to 13 because that is how many wintraps were placed. But I wonder if Max Buildings has a limit like 9 or something?

Probably I missed the part where you said you were using skirmish AI, you were? I mean, campaign style always have 1 of max building and it rebuilds everything... I think, I never saw anything wrong.

Unless now you sais that you were using campaign style AI and they have the max building into 0 and that can prevent the AI to rebuild certain buildings, wchick it's something Fey knew and told me and I forgot and... My head spins right now...

and no, no limit to 9. the default skirmish AI (which I think it was used on the vanilla game, in "practice" mode) it has a max windtraps of 15, which are needed if that AI wants to have every other building.

34 minutes ago, firefly101 said:

I would think that would be used only for MP Practice AI, but changing the Max to 0 causes the AI not build at all, so there may be some connection. I have tested it though and the AI was rebuilding Destroyed Barracks, Refineries, Outposts with no problems.

I'm sorry if at any point you said your harkonnen were skirmish style kind of AI and I missed it, probably I would think on the "Max building" being part of the problem, because those only affect, as you sais, skirmish one, campaign vanilla-westwood have 1 as max building, and I never bother to try otherwise.

You can even set an AI to build 20 pieces of wall, it will do it like a board chess (unless it has not much room, then yes, it will start connecting pieces of wall one with each other); but it is fun to see the AI weird placemente XD.

34 minutes ago, firefly101 said:

I did notice the AI tends to rebuild more on destroyed buildings, than ones you just sell. So there must be some hardcoded AI stuff somewhere besides the stuff we are editing.

in campaign style, the AI usually rebuild whatever building lost first.
in skirmish style, it is using these values to know what to build next.
image.png.a8b280ed22664f315900a2ba41ffdbf1.png

I THINK It doesn't matter if you destroyed a building or not, he do some math-calculation and then proceed to build whatever building it's next, could be the one you destroyed or something new.

I wrote this with Fey's help on a manual on how the AI to the math, he knows better set-ups for skirmish AIs while I usually pick a vanilla and, if it is weak, I give more resources-units and less to the player to compensate, and sometimes I alter a few values here and there but overall I have no idea what I am doing (Fey totally knows).

But this is the basic:

Quote

Build Ratio [Building]: Sets the order which the AI will build all the buildings available (concrete is not affected). Will start with the biggest value. When more copies of a certain type of building will be constructed, the ratio gets divided by the number of copies of that building that already exists. The number of buildings a Skirmish-type AI will build is dependent on the number set in “Max Buildings”. The AI will ignore power and build what it's told to build, so if you want your AI to keep its power up, you will need to calculate when each structure will be built.

Example:
This AI will build these buildings with these priorities*
Build Ratio Windtrap = 10.000**
Build Ratio Refinery =7.000**
Build Ratio Barrack = 4.000**
*Decimals can be used and are considered when the AI divides the ratio to determine its own build order.
**In this example, “Max Buildings” for each of these will be set to 3.

The AI will build them in this order:
1º Windtrap: 10
1º Refinery: 7
2º Windtrap: (10/2)= 5 
1º Barrack: 4
2º Refinery: (7/2)= 3.5 
3º Windtrap: (10/3)= 3.3 
3º Refinery: (7/3)= 2.3
2º Barrack: (4/2)= 2
3º Barrack: (4/3)= 1.3

 

Edited by Cm_blast
Posted

Hi CM, I am using Campaign AI.

Well I adjusted the Wintraps to 9 instead of 13 and the whole base is acting normal in rebuild. I am using the campaign AI and like you said it should be fine at 1, even the Game designers have their map like that. But I found testing on a vanilla CD version of the game that the AI behaved exactly the same way as my modded version, I also tried the Gruntmod version with the same results. It was only when I adjusted the Max Buildings for the Harkonnen that they started rebuilding buildings correctly.

It has to be some internal bug in code or something, maybe a glitch between the game using the Practice AI and Campaign AI getting mixed up at times. I just know what I tested out. By nature I usually am methodical and work with computers as my occupation, I've made mods for other games so I know about backups and doing little changes to test.

My results were as follows and I hope this helps

Map AT9v1

Emperor would rebuild Buildings but Harkonnen would not

Tried copying working Emperor AI over to Hark, no results

Tried rebuilding Base making smaller and not so close to edge, no results

Tried using Gruntmods and had the same results no better performance by Hark AI

Tried using Vanilla Map in my modded version, No real results

Tried finally using vanilla CD version US 1.06 patch no mods, No results except AI rebuilding Barracks once and replacing only 1 Windtrap.

Then I decided to modify the Max Build to match the units placed for the Harkonnen Side, when I originally did this all buildings were rebuilding but windtraps which seemed to only rebuild when low power was reached.

Then I changed Windtraps to 9 instead of the 13 and not the AI is rebuilding ALL buildings destroyed including windtraps. Emperor still rebuilding base even though nothing was changed on max units.

I also seemed to notice that this weird bug seems to happen when two powerful main houses on the map, one behaves normal the other doesn't, but EACH map seems to react different. In AT9v2 the Emperor is not rebuilding buildings like he should but Hark will rebuild barracks but not the other buildings. More testing needs to be done and AI changes made to that map to confirm that for some reason the game is reading one of the houses or more with MP AI settings.

I just know I tested the Vanilla game, and when the same results were happening it cannot be any change I made to cause this bug. I have seen some other weird bugs with custom maps AI mass spamming Units and sending to attack player base for no reason, I never figure what caused that in the map, I know the game is sensitive to building placement, place a wall piece of the wrong faction the AI behaves funny.

Personally as long as it works I have no problem in changing max buildings for and AI house. I will let you know if the change in another map works the same if it does, then there must be an issue that the developers didn't catch.

 

 

 

Posted
11 hours ago, firefly101 said:

Well I adjusted the Wintraps to 9 instead of 13 and the whole base is acting normal in rebuild. I am using the campaign AI and like you said it should be fine at 1, even the Game designers have their map like that. But I found testing on a vanilla CD version of the game that the AI behaved exactly the same way as my modded version, I also tried the Gruntmod version with the same results. It was only when I adjusted the Max Buildings for the Harkonnen that they started rebuilding buildings correctly.

glad you manage to fix your problem.

11 hours ago, firefly101 said:

I also seemed to notice that this weird bug seems to happen when two powerful main houses on the map, one behaves normal the other doesn't, but EACH map seems to react different. In AT9v2 the Emperor is not rebuilding buildings like he should but Hark will rebuild barracks but not the other buildings. More testing needs to be done and AI changes made to that map to confirm that for some reason the game is reading one of the houses or more with MP AI settings.

I just know I tested the Vanilla game, and when the same results were happening it cannot be any change I made to cause this bug. I have seen some other weird bugs with custom maps AI mass spamming Units and sending to attack player base for no reason, I never figure what caused that in the map, I know the game is sensitive to building placement, place a wall piece of the wrong faction the AI behaves funny.

Personally as long as it works I have no problem in changing max buildings for and AI house. I will let you know if the change in another map works the same if it does, then there must be an issue that the developers didn't catch.

No idea, I have done maps with insanelly big enemy Ais and never found that kind of problem before. But who knows.

Posted

Hi,

Well everything is working again, even with my changes removed. I have no idea if this is a memory thing or what. It really doesn't make sense...... How can the vanilla produce the same results and then the changes fixes the problem, but removing the changes and the problem is gone anyway. lol Only reason I post this is if ANY of you get the same issue when testing your map try what I did to fix it. I can only think this game was made for win98 and somehow it was glitching on the system I am running. I would think it would be a memory based issue but I am at a loss. In BOTH AT9 maps the AI is rebuilding as normal, but before they were not.

I did find keeping the base from the edge is a good idea to remove the build cancel bug, but this other bug that happened is beyond me. I'll let you know if it returns, but I hope not..... Ghosts in the Machine. lol

Posted

Hi,

I figure this is the best thread to use to ask this.

I noticed from the beginning when modding the map that if I set 2 houses to attack at the same time that one seems to cancel the other and only 1 house attacks? Is this a bug or am I missing something? I noticed the game designers left about 1500 ticks or so between house attacks. When I do the same both houses attack, but if I get too close to the same number of ticks only 1 side attacks. All house are set to 100 for morale.

Posted
2 hours ago, firefly101 said:

Hi,

I figure this is the best thread to use to ask this.

I noticed from the beginning when modding the map that if I set 2 houses to attack at the same time that one seems to cancel the other and only 1 house attacks? Is this a bug or am I missing something? I noticed the game designers left about 1500 ticks or so between house attacks. When I do the same both houses attack, but if I get too close to the same number of ticks only 1 side attacks. All house are set to 100 for morale.

They can attack at the same time if you set the same TimeBetweenBuildingAttacks and remove the TimingRandomPercentage (set to 0, if it crashes the game set to 1, can't remember if 0 works on this variable).

If you do not remove the TimingRandomPercentage, AI will either add or subtract that percentage from the TimeBetweenBuildingAttacks so you will never get simultaneous attacks unless you're like the luckiest person in the world.

Posted

Hello Feda,

Thank you for the tip 0 crashes the game but 1 worked fine 1% is so low that its like have 0. The both attacked normal now.

Do you ever think Tibedit will be fixed to add the new changes and bugs that were found?

Posted
56 minutes ago, firefly101 said:

Hello Feda,

Thank you for the tip 0 crashes the game but 1 worked fine 1% is so low that its like have 0. The both attacked normal now.

Do you ever think Tibedit will be fixed to add the new changes and bugs that were found?

Probably not, since nobody has really contacted the author about it lol.

What I think is that either loval or Klof will create a new and better "TibEd" sort of program to edit those bin files.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.