HeavyTank 2° Gen


Not just a tank, its a War-machine !!! 4 tiers of tanks and a lot of different stuff, like acid, fire, storm, piercing, cluster and nuclear heavy shells, rockets and bullets, and a lot of equipments to choose. >>>>READ THE CHANGELOG<<<<<

Content
4 years ago
0.16 - 0.18
55
Combat

g Mod Compatibility with AAI Vehicles

5 years ago

Hello, I'm a fairly new Factorio player, and I love your mod. I've been looking for a way to clear nests in my game and your mod fit the bill perfectly. I know there is an ongoing incompatibility with AAI vehicles and your mod; AAI vehicles forces vehicles to have 1 weapon and splits designs if they have more than 1, your tanks have 3. I know you have contacted the author of AAI vehicles to resolve this issue. However, I would like to tinker with some of the mod files to make my own fix if possible?

I am wondering if there is a line of code in your mod, in your entity files that would exclude it from AAI overwrites?

I am now toying with changing weapon requirements for design splitting and looking to see if I can exclude your tanks from the list.

I've also noticed that with the hovercraft mod installed, your tanks under the hovercraft ; i.e. you mouse over the tank and it shows that its under AAI programmable vehicles>hovercraft.

5 years ago

by the gods
if you find a way to bypass AAI code, i will be very grateful.
About the hovercraft, it has some weird code to make splashes when driving on water and other misc things, its possible that it affects other mods, but i didnt see any impact on my Heavy Tank. If you notice something, please, do tell me.

5 years ago

I found a quick and dirty fix for the time being, I don't think it breaks AAI too much or your mod.

In the Entities folder there is a file called entity-updates.lua, AAI modder made changes to the code so that any vehicle can be controlled by AAI, and to create balance between all the units they limited the weapon number to 1, and assumed that the last weapon would be the best one.

That is why it appears the rocket launcher is the only weapon usable when running Heavy Tanks and AAI. Here is the relevant section of entity-update.lua

" -- only 1 gun per vehicle
if vehicle.guns and #vehicle.guns > 1 then
-- assume last gun is best?
vehicle.guns = {vehicle.guns[#vehicle.guns]}
end"

I simply changed the number of weapons from 1 to 3 in this line "if vehicle.guns and #vehicle.guns > 3 then" using notepad ++.

Now my 6 playthrough of the game I'm able to clear out nests with ease rather than using tons of AAI vehicles or placing turrets down to clear nests.

In the code there is an exception to remove AAI options in entity-update.lua starting at line 248, not sure if that will help but it deals with specific entities like nixie tubes. Then your tanks will be completely excluded. I still haven't found weapon exceptions for specific vehicles.

And as for hovercraft, I haven't seen anything related to water splash, but I mentioned it as it might give a hint to how "classes" of vehicles are coded into the game.

Hope it helps, your mod is super fun!

5 years ago

How to make AAI vehicles shoot out of all loaded guns at the same time or use them together somehow you don't know otherwise?

5 years ago

I was looking for a way to enable guns in Heavy Tank mod, in the original code AAI would force heavy tank's vehicles like the scrap tank to only use rockets. Autocannon or the tank guns were did not show up, and I couldn't load ammo into the vehicle. I'm not a coder I have an arts degree so I'm good at reading documentation and googling things lol.

5 years ago

Stefanthegrey, thanks for advise! I am just add string in classes "and (not string.find(vehicle.name, "HeavyTank", 1, true))" and now heavytank works fine for me (not selectible anymore for aai mod). But changing number of weapons from 1 to 3 not works. Vanilla tank have only 1 weapon instead of 3.

5 years ago

Stefanthegrey, thanks for advise! I am just add string in classes "and (not string.find(vehicle.name, "HeavyTank", 1, true))" and now heavytank works fine for me (not selectible anymore for aai mod). But changing number of weapons from 1 to 3 not works. Vanilla tank have only 1 weapon instead of 3.

Is it not obvious that you need to delete the code that is responsible for limiting the number of implements of equipment to 1, which is so signed? If you mean using more than one weapon with your own equipment without a player, then I tried to do something about it, but when i started the game, the game reported that it could not load AAI PV and offered to disable this mod.

5 years ago

krivougolnik, are you russian?

5 years ago

krivougolnik, are you russian?

Da.

5 years ago

Ок. То есть ты пробовал использовать транспорт с несколькими орудиями для ИИ?

5 years ago
(updated 5 years ago)

Ок. То есть ты пробовал использовать транспорт с несколькими орудиями для ИИ?
После моих манипуляций любая техника может использовать автоматически выбранное мною оружие при использовании внутреннего меню техники справа внизу, техника продолжает использовать выбранное оружие если я выхожу из техники оставив технику с настройкой "Управляющий оружием: водитель", но автоматически переключается на самое первое орудие, если сдвинуть его с места с помощью пульта из AAI.

Я не могу найти часть кода, которая отвечает за оружие по умолчанию, но подозреваю функцию valid_guns из entity-update-externals, но манипуляции со строками с этой функцией и вызывают ошибку при запуске.

5 years ago

Понятно. Спасибо за ответ! А про какие манипуляции ты говорил? Меня бы устроило, то, что хотя бы я сам смогу гонять на транспорте с выбором, а ИИ пусть сам выбирает. Я вообще думал сначала прописать так, чтобы только транспорт, имеющий в названии AAI, мог управляться ИИ. Про valid_guns из entity-update-externals надо посмотреть.

5 years ago
(updated 5 years ago)

Понятно. Спасибо за ответ! А про какие манипуляции ты говорил? Меня бы устроило, то, что хотя бы я сам смогу гонять на транспорте с выбором, а ИИ пусть сам выбирает. Я вообще думал сначала прописать так, чтобы только транспорт, имеющий в названии AAI, мог управляться ИИ. Про valid_guns из entity-update-externals надо посмотреть.

Удали
-- only 1 gun per vehicle
if vehicle.guns and #vehicle.guns > 1 then
-- assume last gun is best?
vehicle.guns = {vehicle.guns[#vehicle.guns]}
end

(entity-update.lua 83 строка)
То, что после -- это комментарий автора к коду.

В файле entity-update-externals.lua удалить всё, начиная с 99 строки (-- vanilla).

5 years ago

krivougolnik, спасибо большое! Все заработало так как надо. Если правильно понял, то entity-update-externals.lua отвечает за разделение техники на подтипы (вроде самолета - ракеты, пулемет). Странно почему разработчики AAI не сделали тоже самое.

5 years ago
(updated 5 years ago)

krivougolnik, спасибо большое! Все заработало так как надо. Если правильно понял, то entity-update-externals.lua отвечает за разделение техники на подтипы (вроде самолета - ракеты, пулемет). Странно почему разработчики AAI не сделали тоже самое.

Разработчик AAI один и он ленивый пидор с шизой на использование нескольких танчиков с разными специализациями, вместо одного универсального с несколькими пушками, и файл с разделением танков и самолётов на пподтипы, который ты отредактировал, как раз он и сделал (обрати внимание, что он изначально был в папке с модом), ибо у него шиза на разделение (наверное, у него полушария мозга разделены, вот и бесится).

5 years ago

Ничего себе ты на него накинулся)) У всех свое видение, может и до него дойдет когда-нибудь эта идея.

New response