RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
AI help

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 83
Well I have hit a big road block. I have my battle system up and running, but there are a few glitches. Namely, my allies will heal the opponent and my opponents will attack themselves or each other. So....that being said, I need help.
If anyone has any experience programming, and can help me with this, please do. Once this step is done, I can start programming the graphics in.
Thank you all :D

*
Rep:
Level 85
Real Men Make Fan Games
Project of the Month winner for May 2009
Holy vagueness, Batman!

Because it sounds like you're using a custom system, there are a bunch of questions that need to get answered to get to the root of your problem...

1) What engine are you using?

2) In your battle system, how is the AI supposed to select targets? Show us the code you are using to set that up.

3) Are there any events that could be altering your targeting system in any way?  Might want to check variables and switches that get reused between multiple parts of your system. 

4) What kind of battle system are we dealing with?  Turn based? ABS? ATB?




****
Rep:
Level 83
Yea, sorry, I was very sleepy. Was up all night programming. lol
I am using Python, but any examples in any language would help alot.
The AI has "spells" that have a priority. I check if the AI's health is low. If so, and it has a healing spell, it uses it. Else it uses a high priority "spell".
This is a turn based system.
There are no events that could interfere. This is just a battle system, written in Python, not a RPG Maker or Game Maker

****
Hey... my name's... Sashikinaroji...
Rep:
Level 83
fear me...
could it be that your targeting is messed up, making the healing spells "offensive" and the attacks "defensive."

That is to say, your spells and attacks may be set up so that they are targeting the wrong people, offensive attacks may be set up to affect allies and defensive skills may be set up to affect enemies... At least, that is how it looks from a cursory view...

Then again, I have no idea what Python is, so...
Ok, DON'T EXPECT HELP FROM ME~! I will perhaps rant a bit, but don't expect me to do graphics for you, even if I say I will... I won't.

****
Rep:
Level 83
I fixed that problem awhile ago. lol. I was being stupid then.

Python is similar to Ruby, except more useful, in my opinion