Hack request - proper AI CM usage
-
FL Hack has an option to automatically fire countermeasures, even if the launcher is inactive. Now that I look at it, it should work with NPCs, too. Give it a try and if it works I’ll have to see how to make it optional for players (unless you always want CMs to auto-fire, in which case: common.dll, 13D078, 606E28->8F9429 = countermeasure launcher always active)
-
Thanks for looking into this. Just gave it a quick shot, but it didn’t seem to work - it glued my CM on (as in, green in the weapons panel, even if I tried to toggle it off) but didn’t seem to have an effect on my NPC target.
Edit: Just realized my target was friendly. I’ll try a hostile one.
Edit2: No dice. Is anything around the CounterMeasureBlock of any use? I would assume the countermeasure_active_time and countermeasure_unactive_time were intended to be the times that the NPC has its CM launcher toggled on and off respectively. -
OK, hope you are getting some sleep now? Need you to be still alive in a few weeks to do that sur tool!
-
Truly excellent work mate, another thing i’ve wanted for years finally off the list. Any chance of getting npcs to fire missiles in missions without turning autoturret on (on every launcher!)
-
Thaddeus wrote:
Truly excellent work mate, another thing i’ve wanted for years finally off the list. Any chance of getting npcs to fire missiles in missions without turning autoturret on (on every launcher!)Oh come on! hack is not required here. Just leave class_fighter npcs for missions and make new(not class_fighter) for system encounters and give them different loadouts. it works, I’ve tested.
-
Adoxa, out of curiosity, you mentioned that giving NPCs proper scanners should make them tougher - what exactly did you mean?
By the way, this hack is boss. I can’t believe how well it works, especially with the now fully functional CounterMeasureBlock in pilot defs. Ship classes that actually have CM launchers in Flak are designed around them, so it was very easy to exploit any AI piloting these vessels by simply launching tons of missiles, which the AI were defenseless against. Awesome stuff.
-
Thaddeus wrote:
Truly excellent work mate, another thing i’ve wanted for years finally off the list. Any chance of getting npcs to fire missiles in missions without turning autoturret on (on every launcher!)Ya, havent looked into this myself but this would be very nice to have fixed.
-
This is entirely a hunch, wild guess, and otherwise anything but fact, but I have a feeling random missions are using a specific AI pilot definition that isn’t normally in pilots_population.ini. If the pilot wasn’t defined in the INI, then all of the associated variables would be using hard-coded defaults, such 0 for important variables like the missile launch cone angle.
I took a quick dabble around content.dll and found the following pilots referenced by hard code:
pilot_0 pilot_rm_solar_easiest pilot_rm_solar_easy pilot_rm_solar_hard pilot_rm_solar_hardest ```Perhaps defining those pilots with correct missile_id entries will fix the issue? Worth a shot anyways. Edit: Screw you Starport, why don't **you** take a break and come back in 30 sec? *hit*
-
foxUnit01 wrote:
Adoxa, out of curiosity, you mentioned that giving NPCs proper scanners should make them tougher - what exactly did you mean?It just seemed they evaded better. Perhaps I was just imagining it (after all, I haven’t actually played for over two years…).
Those rm pilots are in pilots_population. Pilot_0 seems to be used if no pilot was defined, so you could probably add it, creating a new default.
-
Just like you haven’t played in two years, I haven’t looked at vanilla code in almost five.
I’d play around with the RandomMissions missile thing more, but I removed (read: broke) RM functionality in Flak so long ago I need to jump back on a vanilla codebase to look further. I’ll play around with it tomorrow when I get sick of doing of doing homework.