Well, I'm trying to have a Variable go from 0-3
0 is easy
1 is normal
2 is hard
3 is insane
Then I want the note-tag to look like this
<Easy: 4, Always, 5>
I know I will need to make the condition a bit more flexible later, but right now I just want to this work. However, say I have this setting for all 4 difficulties.
<Easy: 4, Always, 5>
<Normal: 5, Always, 5>
etc etc
So on Insane it will have all the other skills of the previous difficulty as well. Here is what I have now
#===============================================================================# Made By: Bloodmorphed# AI Difficulty Add-On to Difficulty Settings, or a stand-alone#####===============================================================================module Blood module Variable #=========================================================================== # This is the variable it will be using, if you are using the difficulty # settings as well, make sure the variables are the same! #=========================================================================== AI_Variable = 100 end #ends Variable module AI case $game_variables[Blood::Variable::AI_Variable] when 0 then Easy = 0 when 1 then Normal = 1 when 2 then Hard = 2 when 3 then Insane = 3 end # ends case end #ends AI module AI_Note AI_SETTING = /<(|):[ ], [ ], [ ]>/i end #ends notetagend # ends blood
Now I can't seem to actually find the action thing in enemies, or battlers. I found some but I'm not too sure which one is actually what I need.
Secondly, creating the note-tags and stuff, Not exactly sure how to do that either. I'm also aware that the case I have there now is very wrong, I think, lol. I do know how to load the database, and the notetags from looking at yanfly's scripts, but I couldn't figure out how he used notetags or how I would use them.
[Ace] Enemy Actions and Note-Tags
● ARCHIVED · READ-ONLY
-
-
I was never able to figure out Yanfly's system myself, but I did find this through DiamondandPlatium3's tutorial videos. It lets you put the string in that you want in notes, and the part in your code (without the first and last /) and see what it actually returns. Maybe it will help?
http://rubular.com/
As for your question, I've never done reading two items at once, only one, so no idea on that part. If it comes to me after sleep I'll post more, or maybe one of the advanced scripts (as I'm still learning like you are) can tell you more? -
Oh crap, I meant to watch Platiums videos! Thank you for reminding me lol.
But uhm, I know how to write a SET notetag, what I need is one line to be able to write what I said.
<Easy: 5, Always, 5>
Something like this. But thats not the only problem I'm having. I'm lost on how to actually MAKE it read the notetag as it's overall action list, and it taking the actions that correspond to the difficulty. Like if I have all my difficulties in one enemy, it would only pull what it needs. Like if its on easy it won't pull Normal and up, but if It's on Insane, it would pull, Insane, Hard, Normal, and Easy skills. -
Sorry, should clarify...to read the notetag, you need to read in the .note command. To give a quick example: In my game, I have it read in the age of my actors. I did it by this command:
$data_actors[actor_id].note[/<Age:\s*(\w+)>/im]
You need to put in the expression in the [] after the .note command. So for yours, it would be $data_enemies[id of the enemy].note[put the expression here]
That link I posted was for figuring out what the expression was you needed in the [] for your string. If you go there, enter in the test string <Easy: 5, Always, 5>, you can then see if those commands will have the program extract out what you want or not. I know by default it stores the first match in a global variable called $1, no idea where the second goes as I've never tried to pull two items from a notetag yet.
One thing...with my approach it will store everything in $1 as a string, and $1.to_i will crash the game (at least it did for me 100% of the time I used it), so maybe another scripter can help with that step? As it is, I only wanted the age as a feature to display, so a string worked for me, but you will need an integer to check the AI level.
Hope that gives you something to start out with at least! I'll be watching too as a script like this is something I would like to see made.