I could use some help makeing the AI use transport ships?
#1
Posted 22 March 2012 - 08:54 PM
I want to make the AI use the transport ships to get to islands. I have been able to make the AI build them which they did not before but they will not garrison them. I have looked in the Mumakil and Siege Tower files to see if I could find anything that would help but I couldn't find anything. I also had a look in skirmishaidata but nothing there either.
I was wandering if anyone had any ideas or knows of a mod where this issue had be resolved?
Thanks a million guys.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#2
Posted 22 March 2012 - 09:58 PM
#3
Posted 22 March 2012 - 10:18 PM
This issue was brought up in another AI problems post but I decided to make a post just for the transport problem. You can find the post here: http://forums.revora...irmish-enemies/
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#4
Posted 22 March 2012 - 11:04 PM
Good idea fella.
This issue was brought up in another AI problems post but I decided to make a post just for the transport problem. You can find the post here: http://forums.revora...irmish-enemies/
you can teach the AI to use the ships as needed. Check scripted-AI as in bfme1(only for ships) and do it. By the way the AI is able to blow bfme1 mines. but that it must be done to understand how it works perfectly scripted-AI.
Edited by Yaroslav, 22 March 2012 - 11:05 PM.
#5
Posted 22 March 2012 - 11:53 PM
Im sorry, Im not sure I understand what you mean by scripted-AI. Do you mean the the scripting in the actual maps themselves? If so, although it's not the fix I had in mind, I'd like to know how to do it that way and would really appreciate it if you could point me to a map with some examples. But, if by scripted-AI, you mean something that can be done with coding, is there any chance you can point me to the files that will get me started.
Thanks a million Yaroslav.
Edited by Titan Cronus, 23 March 2012 - 09:19 AM.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#6
Posted 23 March 2012 - 09:08 PM
Look libraries\ai_isengardskirmish\ai_isengardskirmish.map (in bfme 1 libraries.big)Thanks for the reply fella.
Im sorry, Im not sure I understand what you mean by scripted-AI. Do you mean the the scripting in the actual maps themselves? If so, although it's not the fix I had in mind, I'd like to know how to do it that way and would really appreciate it if you could point me to a map with some examples. But, if by scripted-AI, you mean something that can be done with coding, is there any chance you can point me to the files that will get me started.
Thanks a million Yaroslav.
You can did something similarly do for ships... You do not need drastic changes, in the spirit of do-scripts.
to make the AI landed on the island of the same reasons that people are not very difficult, I suppose, but you need to make a new flag AI. Put it on the island. *If flag AI_On True *And if the threat is radius xxx flag> = xxx to run the following script which will make with the troops crossed there.
Later, I'll do it for my mod, and send you this AI.
I think it is necessary to register in a shared library that loads the game.
foun in when installed game folder libraries\ai_men of the west\ai_men of the west.map
Edited by Yaroslav, 23 March 2012 - 09:22 PM.
#7
Posted 23 March 2012 - 11:54 PM
I found the libraries\ai_isengardskirmish\ai_isengardskirmish.map file but when I open it with the WB, its emply, theres not even the ground (and no scripts).
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#8
Posted 24 March 2012 - 12:43 PM
Example of scripts from Worldbuilder.. This spawns a unit, moves it to a point on the shore, moves an existing transport to that point, and loads the unit onto the transport. It also triggers other scripts to move the loaded transport to the debarkation point and another to spawn another transport if the first is sunk in transit. However, it will be totally useless if the opponents does ANYTHING not covered by the script.... such as sinking the thing before it is loaded, building a wall or structure blocking the debarkation point, attack the transport and force it away without sinking it - leaving it fully loaded and floating useless with no instructions on where to go, etc.....
*** IF *** Timer 'PastureStart' has expired. *AND* NOT Team 'Pasture1' has one or more units. *AND* NOT Unit 'PastureTransport1' exists and is alive. *** THEN *** Spawn an instance of Team 'Pasture1' at Waypoint 'Mordor3Walkon'. Move Team 'Pasture1' to Waypoint 'PickupPoint3'. Spawn Unit 'PastureTransport1' of type 'EvilMenTransportShip' on Team 'PastureTransports' at waypoint Waypoint 'OtherShipSpawnPoint' Set Unit 'PastureTransport1' strict control to TRUE. Unit 'PastureTransport1' EXACTLY follows waypoints, beginning at Waypoint Path 'PickupPath' Enable Script 'PastureLoading1'. Enable Script 'PastureTransportReplace'.
This is a lot of effort to tell some fool to get on a ship.
This is not an acceptable substitute for good AI. Scripting should be limited to actions taking place where and when the opponent has zero chance of interferring with the instructions because the instructions are dumb and allow no room for improvisation. I usually include an IF condition to delay any necessary action script until the view is elsewhere and the opponent has no units close enough to take "unscripted" action.
Example.... send a bombard ship in to destroy a defending tower. When the tower is gone, the bombard ship will blithley sit there like a duck patiently waiting for the retribution unless you give further instructions.
My suggestion: Script general spawns, start and stop actions, Don't script details unless you are prepared to script all possible details.
#9
Posted 24 March 2012 - 06:18 PM
It's quite a lot of work for something thats not really failproof but absolutly better that how it is at the moment. I think I'll have this as my "Plan B" for if I fail to find a way to get the AI to do it on their own.
Thanks again hoogan
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#10
Posted 25 March 2012 - 12:16 AM
.
*** IF *** Timer 'PastureStart' has expired. *AND* NOT Team 'Pasture1' has one or more units. *AND* NOT Unit 'PastureTransport1' exists and is alive. *** THEN *** Spawn an instance of Team 'Pasture1' at Waypoint 'Mordor3Walkon'. Move Team 'Pasture1' to Waypoint 'PickupPoint3'. Spawn Unit 'PastureTransport1' of type 'EvilMenTransportShip' on Team 'PastureTransports' at waypoint Waypoint 'OtherShipSpawnPoint' Set Unit 'PastureTransport1' strict control to TRUE. Unit 'PastureTransport1' EXACTLY follows waypoints, beginning at Waypoint Path 'PickupPath' Enable Script 'PastureLoading1'. Enable Script 'PastureTransportReplace'.
better to scan the island to find the enemy there, and if so what do the ships and the "stuff" to other units script there.
#11
Posted 25 March 2012 - 01:33 AM
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#12
Posted 25 March 2012 - 01:03 PM
Hey there people.
I want to make the AI use the transport ships to get to islands. I have been able to make the AI build them which they did not before but they will not garrison them. I have looked in the Mumakil and Siege Tower files to see if I could find anything that would help but I couldn't find anything. I also had a look in skirmishaidata but nothing there either.
I was wandering if anyone had any ideas or knows of a mod where this issue had be resolved?
Thanks a million guys.
You say your enemy builds Transport Ships after you increase that percentage, right? But mine still doesn't... :( I increased it until 50 if you remember but the enemy only builds fighting naval units...
#13
Posted 25 March 2012 - 02:39 PM
;//////////////// Good Faction Ships /////////////////////////////////////////////// ArmyMemberDefinition ElvenBattleShip_Member Unit = ElvenBattleShip PercentageOfArmyPhase1 = 5.0 PercentageOfArmyPhase2 = 10.0 PercentageOfArmyPhase3 = 15.0 End ArmyMemberDefinition ElvenFireShip_Member Unit = ElvenFireShip PercentageOfArmyPhase1 = 0.0 PercentageOfArmyPhase2 = 5.0 PercentageOfArmyPhase3 = 10.0 End ArmyMemberDefinition ElvenShoreBombardShip_Member Unit = ElvenShoreBombardShip PercentageOfArmyPhase1 = 0.0 PercentageOfArmyPhase2 = 2.5 PercentageOfArmyPhase3 = 5.0 End ArmyMemberDefinition ElvenTransportShip_Member Unit = ElvenTransportShip PercentageOfArmyPhase1 = 1.0 PercentageOfArmyPhase2 = 2.0 PercentageOfArmyPhase3 = 3.0 End ;//////////////// Evil Faction Ships /////////////////////////////////////////////// ArmyMemberDefinition EvilMenCorsairShip_Member Unit = EvilMenCorsairShip PercentageOfArmyPhase1 = 5.0 PercentageOfArmyPhase2 = 10.0 PercentageOfArmyPhase3 = 15.0 End ArmyMemberDefinition EvilMenTransportShip_Member Unit = EvilMenTransportShip PercentageOfArmyPhase1 = 1.0 PercentageOfArmyPhase2 = 2.0 PercentageOfArmyPhase3 = 3.0 End ArmyMemberDefinition EvilFireShip_Member Unit = EvilFireShip PercentageOfArmyPhase1 = 0.0 PercentageOfArmyPhase2 = 5.0 PercentageOfArmyPhase3 = 10.0 End ArmyMemberDefinition EvilShoreBombardShip_Member Unit = EvilShoreBombardShip PercentageOfArmyPhase1 = 0.0 PercentageOfArmyPhase2 = 2.5 PercentageOfArmyPhase3 = 5.0 End
You need to replace the code in skirmishaidata for each army with one of these code sets, Evil Faction Ships for the evil armies and Good Faction Ships for the good armies. Im not so sure how successful changing it in the map file actually is. It seemed to be working but now I think it was just the changes in skirmishaidata.
ADDED: As you can see, I have lowered the percentages quit a bit from how I suggested to you before. I found that if I had the percentages any higher, the AI armies would spent far too much command points on the ships and would not leave enough command points for their land based army.
ADDED MORE: Also, I found a really good game map to test all this on is the Evendim map.
Edited by Titan Cronus, 25 March 2012 - 02:52 PM.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#14
Posted 26 March 2012 - 03:37 PM
Righty, I found a script (b_AIAttack - Transport Load) in libraries/ai_attack_execution/ai_attack_execution Map file that orders units into a transport unit. Im guessing that this script is not being called for though. So, I reckon, getting that called for should fix our problem.
I've spent ages looking through all the files in libraries but I still can't get a grasp of how it all worrks. For example, there are only four faction skirmish ai files (ai_mordorskirmish ect...) and they are for the four BfMe 1 factions (gondor, rohan, isengard and mordor) and they all seem to have the same content. These files kinda look like they're creating the teams that call on all the scripts in files like lib_attack_behaviors and ai_attack_execution ect.... But, because I haven't worked out how its all working and because I can't comfirm that these files are indeed responsable for creating all teams, I don't know where/how to add new teams that will call on the "b_AIAttack - Transport Load" script.
I don't suppose anyone has any ideas where or how I should start? Also, I may have compleatly misunderstood everything and have all the files figured totally wrong, in which case, if you could correct me I would really appreciate it.
Thanks a million guys.
Edited by Titan Cronus, 26 March 2012 - 03:39 PM.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#15
Posted 29 March 2012 - 10:06 PM
Hey again people.
Righty, I found a script (b_AIAttack - Transport Load) in libraries/ai_attack_execution/ai_attack_execution Map file that orders units into a transport unit. Im guessing that this script is not being called for though. So, I reckon, getting that called for should fix our problem.
I've spent ages looking through all the files in libraries but I still can't get a grasp of how it all worrks. For example, there are only four faction skirmish ai files (ai_mordorskirmish ect...) and they are for the four BfMe 1 factions (gondor, rohan, isengard and mordor) and they all seem to have the same content. These files kinda look like they're creating the teams that call on all the scripts in files like lib_attack_behaviors and ai_attack_execution ect.... But, because I haven't worked out how its all working and because I can't comfirm that these files are indeed responsable for creating all teams, I don't know where/how to add new teams that will call on the "b_AIAttack - Transport Load" script.
I don't suppose anyone has any ideas where or how I should start? Also, I may have compleatly misunderstood everything and have all the files figured totally wrong, in which case, if you could correct me I would really appreciate it.
Thanks a million guys.
I am too lazy to read and translate it all. and to explain the more ... well, these days I'll make you this "logic" for 1 faction. Are you the image and likeness for the rest.
but if you want a reasonable action by the AI, you have to add the flags on the island in worldbuider. Later, i'm explane all.
Edited by Yaroslav, 29 March 2012 - 10:08 PM.
#16
Posted 03 April 2012 - 10:47 AM
I have added all the correct AI markers on the islands for the AI to use but it hasn't made any noticable difference. I generally add AI markers to any map I use that hasn't got them on it already.
I think I know what I need to do. I think I need to add new teams that once created, call apon the "b_AIAttack - Transport Load" script. If that is indeed what I should be doing, could someone please confirm that Im on the right path and then I can start concentrating my efforts in that area.
Thanks a million guys.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#17
Posted 07 April 2012 - 10:11 AM
I have been thinking, the AI does not use the mines either (Dwarves and Goglins resorce structures). I wonder if getting a fix for the mines issue will offer a solution for this transport one. If anyone knows of a fix or a mod that has already fixed it, please point me to it. Maybe if I can see how someone solved the mines issue, I may be able to figure out how to fix the transport issue.
Thanks a million guys.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#18
Posted 13 April 2012 - 10:20 AM
#19
Posted 14 April 2012 - 06:46 PM
Will making changes to the libraries files have any impact on the game what-so-ever? Like, did you experiment with them and if you did, was there any success at all? Im just a bit reluctant to have to edit every map. I'd kinda like to fully rule out the possibility of using the libraries files. I hope that doesn't sound like Im being a stubborn tit. It's just that if it's possibile, even if it's really hard, then I don't mind doing it.
Thanks,
Titan.
Edited by Titan Cronus, 15 April 2012 - 02:46 PM.
Battle of the Pelennor Fields
Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.
#20
Posted 15 April 2012 - 11:56 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users