11-17-2015, 03:14 PM
I have been toying with my game's enemy AI. Yes, that's obvious from the above, but now it's done on one level. I can add tags to skills that will tell an enemy only to use them on targets with X state, without X state, or immune to X element. (I intend to add more, perhaps, like only healing allies at a certain hp_rate?) The script tells the enemy whether to try to use it, and then restricts its specific targets only to those that are relevant.
It's cleaner than my original method that used two different AI scripts and both skill and enemy notebox stuff. Now it's one script and only skill notebox stuff. The script feels rather short too... makes me wonder if there's some fatal oversight. @ -@
The next level for this script is the ability for AI to be based on straight ruby/RGSS. I've got this to work but, as I've said in the shoutbox, I currently have the script stored as an external .rb file for the sake of convenience. (I mean I guess it could be stored with the rest of the scripts in the Script Editor...) I was hoping to save it to an rvdata2 file, but as I'm dealing with code itself over more sensible objects (i.e. strings) I'm not sure it's simple.
However since I can now have enemies use (support) skills a bit more smartly, I can probably deal with RM's basic AI roulette for now... I really need to not obsess over code like this or I'll never progress with the rest of the game...
It's cleaner than my original method that used two different AI scripts and both skill and enemy notebox stuff. Now it's one script and only skill notebox stuff. The script feels rather short too... makes me wonder if there's some fatal oversight. @ -@
The next level for this script is the ability for AI to be based on straight ruby/RGSS. I've got this to work but, as I've said in the shoutbox, I currently have the script stored as an external .rb file for the sake of convenience. (I mean I guess it could be stored with the rest of the scripts in the Script Editor...) I was hoping to save it to an rvdata2 file, but as I'm dealing with code itself over more sensible objects (i.e. strings) I'm not sure it's simple.
However since I can now have enemies use (support) skills a bit more smartly, I can probably deal with RM's basic AI roulette for now... I really need to not obsess over code like this or I'll never progress with the rest of the game...