Adding AI heroes minimod to the Conversion Pack v2.0
Moderator: Moderators
-
nwdst
- Recruit Womprat Killer
- Posts: 6
- Joined: Mon Dec 08, 2008 9:17 pm
Adding AI heroes minimod to the Conversion Pack v2.0
First off, hats off to the team that created the Conversion Pack 2.0. They gave us more than anyone could possible think of as far as mods come. Also thanks to the many others who have contributed much to improving the vanilla game.
One of my most favorite mods that I love to play with is Archer01’s AI heroes’ mini mod. This mod is pretty simple; it allows both your team and the other team’s bots to use heroes on the game’s original maps. I think it gives a better feel for Battlefront 1 in BF2 engine because you can play alongside your hero and have to deal with the enemy heroes. Here is the original thread and download:
http://www.gametoast.com/forums/viewtop ... =64&t=7088
Archer01 says that the AI heroes mod “doesn't affect modded maps at all (for good or bad). The hero script has to be run by the map lua itself, so the only way I know of to get it working on the Conversion Pack would be to get Teancum to add it in himself. Sorry.”
So my main question is there any way to mod the conversion pack to add this mini-mod to the conversion pack. I don’t want to get into making any major changes although the mini-mod is pretty small. I am fine if the makers of the conversion pack think that this is not a good idea or screws with the some other features. Here is the code he talks about in the mod:
Code:
SetHeroPlayerRule("Random") --Sets the player assignment for the hero to "Random Player"
SetHeroRespawnRule("10") --Sets the hero respawn time to 10 seconds
Could I add this to the conversion pack maps myself? Or do I have to have the lua file and build the maps again? If I could do the first question I would like to try; if it’s the second, I don’t think I am going to mess with the heart of the conversion pack. A simple yes/no answer is fine. A sentence or two why yes/no would be helpful also.
I tried adding the conversion maps to the addme.script file, but that didn’t work. I tried getting in the mod tools for the conversion pack, but it gets intense fast. Suggestions are welcome.
Lastly, I am very sorry if I violated any rules in my first ever post. Again, this mod and game are several years old and some of the old links don’t work and it’s easy to get lost in all the topics. Sorry for the long post, but this has always bugged me why I can fight enemy heroes in the conversion pack (especially due to their coolness). I am really just looking for some closure here. Again, the conversion pack is great. If it wasn’t great, I wouldn’t care about the AI heroes mod for it. Sorry for the long post, I tried to break it up.
One of my most favorite mods that I love to play with is Archer01’s AI heroes’ mini mod. This mod is pretty simple; it allows both your team and the other team’s bots to use heroes on the game’s original maps. I think it gives a better feel for Battlefront 1 in BF2 engine because you can play alongside your hero and have to deal with the enemy heroes. Here is the original thread and download:
http://www.gametoast.com/forums/viewtop ... =64&t=7088
Archer01 says that the AI heroes mod “doesn't affect modded maps at all (for good or bad). The hero script has to be run by the map lua itself, so the only way I know of to get it working on the Conversion Pack would be to get Teancum to add it in himself. Sorry.”
So my main question is there any way to mod the conversion pack to add this mini-mod to the conversion pack. I don’t want to get into making any major changes although the mini-mod is pretty small. I am fine if the makers of the conversion pack think that this is not a good idea or screws with the some other features. Here is the code he talks about in the mod:
Code:
SetHeroPlayerRule("Random") --Sets the player assignment for the hero to "Random Player"
SetHeroRespawnRule("10") --Sets the hero respawn time to 10 seconds
Could I add this to the conversion pack maps myself? Or do I have to have the lua file and build the maps again? If I could do the first question I would like to try; if it’s the second, I don’t think I am going to mess with the heart of the conversion pack. A simple yes/no answer is fine. A sentence or two why yes/no would be helpful also.
I tried adding the conversion maps to the addme.script file, but that didn’t work. I tried getting in the mod tools for the conversion pack, but it gets intense fast. Suggestions are welcome.
Lastly, I am very sorry if I violated any rules in my first ever post. Again, this mod and game are several years old and some of the old links don’t work and it’s easy to get lost in all the topics. Sorry for the long post, but this has always bugged me why I can fight enemy heroes in the conversion pack (especially due to their coolness). I am really just looking for some closure here. Again, the conversion pack is great. If it wasn’t great, I wouldn’t care about the AI heroes mod for it. Sorry for the long post, I tried to break it up.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
We do have some of archer01's hero support integrated into the Pack - this is how we have the AI heroes for all of the "Classic Conquest" modes (the BF1 mode).
However, the main reason AI heroes weren't integrated into the majority of the modes is because doing so nullifies the possibility of online play - AI hero support "breaks" multiplayer.
What archer01's mod does (and the reason it "doesn't affect modded maps at all") is add several of the stock maps in, as separate maps. It's a "map pack" in and of itself.
Now, it's completely feasible for anyone to create their own version of this, using archer01's hero support script as a base. You would make this mod in a very similar way to the way he made his: having a "map pack" that consists basically of just an addme.script that piggybacks all your new scripts (which could use one of the many new modes supported in the 1.3 patch, like "AI mode," for example) onto all the stock maps.
However, the main reason AI heroes weren't integrated into the majority of the modes is because doing so nullifies the possibility of online play - AI hero support "breaks" multiplayer.
What archer01's mod does (and the reason it "doesn't affect modded maps at all") is add several of the stock maps in, as separate maps. It's a "map pack" in and of itself.
Now, it's completely feasible for anyone to create their own version of this, using archer01's hero support script as a base. You would make this mod in a very similar way to the way he made his: having a "map pack" that consists basically of just an addme.script that piggybacks all your new scripts (which could use one of the many new modes supported in the 1.3 patch, like "AI mode," for example) onto all the stock maps.
-
nwdst
- Recruit Womprat Killer
- Posts: 6
- Joined: Mon Dec 08, 2008 9:17 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
I understand more now. My issue is that I don't understand the BF1 mode. How do I get that working?
I hate to be kind of hard on your mod, but for reasons unkown, the ingame descriptions in many cases are not displayed. So even if I have the documentation for the conversion pack, I still don't understand what I choosing in some cases.
Again the best mod I have seen for many FPS in a long time. I wish I knew more about the game so I didn't have to ask some many simple questions.
So from your response, you keep out AI heroes for Multiplayer support. But you could add them for singleplayer if you created a new map just for singleplayer. Any easy way to do this without recreating the map? I am sorry if I am off base.
PS. I played a LAN game last night by myself, expecting not to see AI heroes on an original game map. I was shocked to get killed by darth vader. I didn't try joining the game from 2 computers, but it worked for me hosting the mod. There could be some other problems I didn't see. I will test more tonight.
I hate to be kind of hard on your mod, but for reasons unkown, the ingame descriptions in many cases are not displayed. So even if I have the documentation for the conversion pack, I still don't understand what I choosing in some cases.
Again the best mod I have seen for many FPS in a long time. I wish I knew more about the game so I didn't have to ask some many simple questions.
So from your response, you keep out AI heroes for Multiplayer support. But you could add them for singleplayer if you created a new map just for singleplayer. Any easy way to do this without recreating the map? I am sorry if I am off base.
PS. I played a LAN game last night by myself, expecting not to see AI heroes on an original game map. I was shocked to get killed by darth vader. I didn't try joining the game from 2 computers, but it worked for me hosting the mod. There could be some other problems I didn't see. I will test more tonight.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
It sounds like you had an issue installing the 1.3 patch (which is included with the Pack, and required to have the correct localizations in the menu). It should autoinstall, but if for whatever reason it didn't work, go ahead and download the newer revision here:
http://starwarsbattlefront.filefront.co ... atch;95418
Make sure that any traces of the older version of the 1.3 patch (the one that came with the Pack) aren't present. You could find this (traces of the older version) in GameData\v1.3patch.
As for adding AI heroes to singleplayer - just like I mentioned above, it's not too difficult, provided you understand how the addme.lua works. You don't need to make a "new map" or "recreate" anything. As long as you have the scripts for the stock maps (and you do, they're in the BF2_modtools\assets\scripts folder), you can create a new mode for each stock map that includes AI heroes, and just use a "dummy" map's addme.lua to add these modes (I say "dummy" map because you wouldn't be creating a map, you'd just munge this map so that you had a new addon map folder).
http://starwarsbattlefront.filefront.co ... atch;95418
Make sure that any traces of the older version of the 1.3 patch (the one that came with the Pack) aren't present. You could find this (traces of the older version) in GameData\v1.3patch.
As for adding AI heroes to singleplayer - just like I mentioned above, it's not too difficult, provided you understand how the addme.lua works. You don't need to make a "new map" or "recreate" anything. As long as you have the scripts for the stock maps (and you do, they're in the BF2_modtools\assets\scripts folder), you can create a new mode for each stock map that includes AI heroes, and just use a "dummy" map's addme.lua to add these modes (I say "dummy" map because you wouldn't be creating a map, you'd just munge this map so that you had a new addon map folder).
-
nwdst
- Recruit Womprat Killer
- Posts: 6
- Joined: Mon Dec 08, 2008 9:17 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Ok...so can I just edit the addme.script file with notebook, or do I actually have to build it again using the mod tools? I haven't fully read the mod tools documentation yet. I tried the notebook, but it didn't work.
Anyhow, I will try to play with it some more and get back on my findings. Do you think I could modify the scripts to make the mod only work with instant action and not for multiplayer? That would be good start since multiplayer seems to be an issue.
At any rate, I play with it a bit more before I ask any more questions. As always, I really appreciate your comments, work on the conversion pack, and this forum. Really, really interesting stuff here. I'm trying to get this done for a friend makes it rewarding if I can actually get it to work in some form.
Anyhow, I will try to play with it some more and get back on my findings. Do you think I could modify the scripts to make the mod only work with instant action and not for multiplayer? That would be good start since multiplayer seems to be an issue.
At any rate, I play with it a bit more before I ask any more questions. As always, I really appreciate your comments, work on the conversion pack, and this forum. Really, really interesting stuff here. I'm trying to get this done for a friend makes it rewarding if I can actually get it to work in some form.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Definitely be best to get a feel for the Mod Tools - you will need them. You can't edit the addme.script file to do what you want - the addme.script is the munged (compiled) version of the addme.lua. To compile one for yourself, you will need to understand how to create a new map and a little of how to work with .luas. Your best teacher is going to be any examples you see in the assets. You'll also find many people here willing to answer individual questions as they pop up.
And yes, it's easy to make something only available in singleplayer only and not in multiplayer (I did this for Space Endor in the Conversion Pack due to its online incompatibility).
The biggest thing you'll want to learn how to do is how to actually modify and set up some of the stock conquest .luas to work with the Hero Support script. It will be a pretty decent amount of work to set all of them up (so I would definitely try seeing if you can set up just one at a time first). If you can get those set up, we'll be happy to help you set up the addme.lua correctly.
And yes, it's easy to make something only available in singleplayer only and not in multiplayer (I did this for Space Endor in the Conversion Pack due to its online incompatibility).
The biggest thing you'll want to learn how to do is how to actually modify and set up some of the stock conquest .luas to work with the Hero Support script. It will be a pretty decent amount of work to set all of them up (so I would definitely try seeing if you can set up just one at a time first). If you can get those set up, we'll be happy to help you set up the addme.lua correctly.
- Super_Clone
- High General

- Posts: 803
- Joined: Sat Jul 12, 2008 7:58 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Florida
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Thats a good idea, someone could make a AI Heroes era to add to the Conv. Pack and vanilla maps, but only have it accesable through S.P.
-
Nova Hawk
- Banned
- Posts: 4089
- Joined: Mon Sep 22, 2008 3:17 pm
- Projects :: No Mod project currently.
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Yeah, it would be fun to have the AI being led by a hero instead of just soldiers vs soldiers so there can be a more far chance of winning, then just going to capture enemy command posts and cutting down as many AIs as possible.
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
The problem with adding this mode to all the maps is that it's just one more script the game has to load, and the Convo. Pack is getting up there anyways.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Adding AI heroes minimod to the Conversion Pack v2.0
I never spent much time looking at that script. If you can apply it to a map through only Lua changes (preferred in only ScriptPostLoad), then it could be added to all maps through a custom user script working with the v1.3 patch's 'get map name' function. However, you would have to rename/delete the script file to turn the AI heros off, so it wouldn't be something you could just choose to use/not use ingame.Frisbeetarian wrote:it's just one more script the game has to load, and the Convo. Pack is getting up there anyways.
-
nwdst
- Recruit Womprat Killer
- Posts: 6
- Joined: Mon Dec 08, 2008 9:17 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Well, it been a few days since I last posted and I haven't tried any coding, but rather found some interesting things about archer01's AI heroes mod v1.3:
1. The mod may work in multiplayer, I tried this over my LAN with two computers with the same version, conversion pack 2.0, and the AI heroes mod v1.3 installed on both. However, the joining 2nd player acted a bit funny at first; at first he wouldn't join the game. The countdown just kept resetting to 15 a couple of times when it counted to zero (maybe a connection problem). Then when the 2nd player got in after hittting a bunch of buttons it instantly died. But after that, I (2nd player joining) managed to respawn and get killed by an AI Emperor in the Death Star with 2 computers over the LAN. Amazing.
2. The AI heores mod works with Galactic conquest, making the stages far more harder to beat. Darth Vader had 50 kills on Dagobah one time until my AI Yoda killed him. Fun, fun, and fun.
3. I am still need to take a look at the coding some more to determine how to mod the mod properly; any help here is greatly apprciated espescially if someone is willing to play with it. I have some time these next couple of weeks to try it, but my guess is that I will be just getting familiar with the whole mod system. I have modded games before, but never this one.
Suggestions are welcome. Thanks to everyone who has commented so far. I am just looking for a better BF2 experience.
1. The mod may work in multiplayer, I tried this over my LAN with two computers with the same version, conversion pack 2.0, and the AI heroes mod v1.3 installed on both. However, the joining 2nd player acted a bit funny at first; at first he wouldn't join the game. The countdown just kept resetting to 15 a couple of times when it counted to zero (maybe a connection problem). Then when the 2nd player got in after hittting a bunch of buttons it instantly died. But after that, I (2nd player joining) managed to respawn and get killed by an AI Emperor in the Death Star with 2 computers over the LAN. Amazing.
2. The AI heores mod works with Galactic conquest, making the stages far more harder to beat. Darth Vader had 50 kills on Dagobah one time until my AI Yoda killed him. Fun, fun, and fun.
3. I am still need to take a look at the coding some more to determine how to mod the mod properly; any help here is greatly apprciated espescially if someone is willing to play with it. I have some time these next couple of weeks to try it, but my guess is that I will be just getting familiar with the whole mod system. I have modded games before, but never this one.
Suggestions are welcome. Thanks to everyone who has commented so far. I am just looking for a better BF2 experience.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Adding AI heroes minimod to the Conversion Pack v2.0
nwdst wrote:1. The mod may work in multiplayer, I tried this over my LAN with two computers with the same version, conversion pack 2.0, and the AI heroes mod v1.3 installed on both. However, the joining 2nd player acted a bit funny at first; at first he wouldn't join the game. The countdown just kept resetting to 15 a couple of times when it counted to zero (maybe a connection problem). Then when the 2nd player got in after hittting a bunch of buttons it instantly died. But after that, I (2nd player joining) managed to respawn and get killed by an AI Emperor in the Death Star with 2 computers over the LAN. Amazing.
The bigger issue is that in Multiplayer the AI gets to be the hero, but the server MUST be configured to NOT allow heroes, otherwise a player can be the hero too, making two of a hero running around.
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Actually the script takes the AI hero away if the player takes control of it. Or it does in SP.Teancum wrote:nwdst wrote:1. The mod may work in multiplayer, I tried this over my LAN with two computers with the same version, conversion pack 2.0, and the AI heroes mod v1.3 installed on both. However, the joining 2nd player acted a bit funny at first; at first he wouldn't join the game. The countdown just kept resetting to 15 a couple of times when it counted to zero (maybe a connection problem). Then when the 2nd player got in after hittting a bunch of buttons it instantly died. But after that, I (2nd player joining) managed to respawn and get killed by an AI Emperor in the Death Star with 2 computers over the LAN. Amazing.
The bigger issue is that in Multiplayer the AI gets to be the hero, but the server MUST be configured to NOT allow heroes, otherwise a player can be the hero too, making two of a hero running around.
-
nwdst
- Recruit Womprat Killer
- Posts: 6
- Joined: Mon Dec 08, 2008 9:17 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Can't you just make the player requirements for unlocking the hero ridiculously high (i.e. 200+ kills)? That would solve the 2 heroes issue. Then add the mod through a modified map selection or mode with a AI heroes like Battlefront 1 vanilla was shipped.Teancum wrote:The bigger issue is that in Multiplayer the AI gets to be the hero, but the server MUST be configured to NOT allow heroes, otherwise a player can be the hero too, making two of a hero running around.
Of course, I speak of this as having no knowledge of how anything works. Just merely for conversation purposes. I take your conversion pack as a mapped base conversion and not to bring back everything from BF1. In BF1, the rocket class was killer with mines and rockets that were more like long range grenades.
Thanks for your comments.
EDIT
I was able to unlock the hero when I was fighting alongside Obi-wan in SP with the AI Heroes mod v1.3.Caleb1117 wrote:Actually the script takes the AI hero away if the player takes control of it. Or it does in SP.
In multiplayer, I was able to do the same after mashing the keyboard, my second player got killed instantly, and respawning. I have no clue what was going on there, but I was playing it for at least a few minutes. Never tried 2 comps on the internet with different clients.
Also, I noticed that the AIhereos minimod sometimes calls the actual bot "Darth Vader" in the summary after the battle (with kills and points), but sometimes it's just unit034 or whatever and it's favorite class is Darth Vader (favorite weapon is Darth Vader's lightsaber). I haven't recorded which stages are which yet. I could be wrong on that, but sometimes a bot UnitXXX has 50 kills and that usally tips me off. I see a heroes name like obi-wan or darth vader sometimes too. Strange however.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Not in MP. No offense, but I should knowCaleb1117 wrote:Actually the script takes the AI hero away if the player takes control of it. Or it does in SP.
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Adding AI heroes minimod to the Conversion Pack v2.0
None taken. Thats odd, why should it not work in MP?Teancum wrote:Not in MP. No offense, but I should knowCaleb1117 wrote:Actually the script takes the AI hero away if the player takes control of it. Or it does in SP.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Adding AI heroes minimod to the Conversion Pack v2.0
I dunno, I just remember testing it pretty extensively back in the day with Fusion (and that GlitchMaster guy would join - Fusion knows what I'm talking about).
-
nwdst
- Recruit Womprat Killer
- Posts: 6
- Joined: Mon Dec 08, 2008 9:17 pm
Re: Adding AI heroes minimod to the Conversion Pack v2.0
Well, after some more playing, I think I have finally figured out how the AI heroes minimod works. It seems to assign a player on both sides as the name of the hero for that side and that stage (i.e. Darth Vader, Obi-wan, etc.). Then once that hero dies, it assigns an already existing AI player (i.e. Unit123, Ben Urland, etc.) as the revived hero. It then does this as many times as it can until the fight ends.
I am going to see if I can add the maps to the minimod first, then see if I can mod it some more so that it displays the correct info, maybe make it so you can turn in off in game, etc.
I am going to see if I can add the maps to the minimod first, then see if I can mod it some more so that it displays the correct info, maybe make it so you can turn in off in game, etc.
