AI Hero Script

Working on a new map? Have a new mod out for swbf2?! Post an announcement of the up-coming release here.

Moderator: Moderators

Post Reply
User avatar
Rayman1103
Private Second Class
Posts: 72
Joined: Mon Aug 02, 2010 10:54 am
Location: Wisconsin

AI Hero Script

Post by Rayman1103 »

Hello everyone.

I've been working on a user_script which allows AI Heroes to spawn on all maps (including custom maps).

I have a few questions on what you'd like to see implemented:

1. If heroes are off in options, should the AI Heroes be disabled too? (I'm thinking yes)

2. Should I use the Hero Respawn value from the Hero Options menu to determine the AI Hero respawn time, so they're the same as players? Or should I use a hard-coded 30 seconds for example? (I'm leaning towards allowing players to select the time from the menu, but undecided)

3. Should I also set the initial AI Hero spawn time the same as the value in the Hero Options if the player has Time selected? (This means if the Hero Unlock Rule is set to "Time" then use the time value)

4. Should I broadcast voiceovers for when heroes enter and exit the battlefield? (This would only work for default heroes of course)

5. If the player doesn't have the Hero Unlock Rule set to "Time" and it's set to "Points", what should the AI Hero initial spawn time be set to? (I'm thinking either 0 or 5 seconds)

Thanks for your feedback! If you have any questions feel free to ask.

I plan to release the mod soon.
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: AI Hero Script

Post by ARCTroopaNate »

How will this affect mods that already have AI heroes??
User avatar
Rayman1103
Private Second Class
Posts: 72
Joined: Mon Aug 02, 2010 10:54 am
Location: Wisconsin

Re: AI Hero Script

Post by Rayman1103 »

Good question, I'm glad you've brought it up.

Currently I've coded it so if Archer01's AIHeroSupport script is active, or if the mission is running in Campaign mode, then my AIHeroScript will not activate. Otherwise there would be 2 AI Heroes running around.

I haven't tried testing to see if there's a way to override the map's AI Hero's with that of my script instead. I'm not sure if I should anyway, even if it is possible.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: AI Hero Script

Post by Maveritchell »

I won't speak for everyone, but I'd prefer if you left already-implemented AI heroes alone, as you had planned. You could probably work it in, but it'd sort've bust the core concept of Dark Times (i.e. conditional infantry units based off of the randomized hero). Just one guy's opinion.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: AI Hero Script

Post by Anakin »

Can't wait for the source code :D
willkilla
Private Recruit
Posts: 28
Joined: Wed Mar 11, 2015 9:36 pm
Projects :: No Mod project currently.
Games I'm Playing :: bf2
xbox live or psn: No gamertag set

Re: AI Hero Script

Post by willkilla »

Wow this is a great idea. I always feel guilty spawning as a hero in SP because I know the AI won't and it's a huge advantage
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: AI Hero Script

Post by Anakin »

willkilla wrote:Wow this is a great idea. I always feel guilty spawning as a hero in SP because I know the AI won't and it's a huge advantage
i feel guilty when i spawn, because the ai is so stupid :funny2:
Post Reply