How can i make ai patches?

Started by Romeotantan, February 06, 2009, 04:49:53 PM

Previous topic - Next topic

Romeotantan

Can any one help me, i'm trying to learn how to make ai patches, can any one tell me where can i find a step by step tutorial about ai making?

XGargoyle

Basically, you need to modify the current ai (if there's one) that has been coded by the original author. There's no universal patch, each character has its own ai coding.


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

Romeotantan

Quote from: XGargoyle on February 06, 2009, 06:50:19 PM
Basically, you need to modify the current ai (if there's one) that has been coded by the original author. There's no universal patch, each character has its own ai coding.

Yes i know but i meant a tutorial that gives a step by step guide for guys that are new to the whole coding thing but desperatly need to learn, u know what i mean?


Romeotantan

but how is it differant from winane's coding?

XGargoyle

Winane's is just an AI activation code, nothing else. That means, it's a code that activates the AI, but you still need to add the AI routines by yourself, which is independent from Winane's AI activation code.


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!

Romeotantan


Bastard Mami

mugen does not has native support for the ai, winane's method is just a method to detect if the character is being controlled by the ai, nothing else.

Byakko

You're still the one who has to tell how the AI works.
Winane's code is used to detect if the character is being controlled by the AI. But the AI by itself doesn't do much if you don't tell it what it should do. That's what you do what you code the AI.
Winane's code basically sets a certain variable to 1 if the character is indeed controlled by the AI. So what you do is check if the variable is 1, and you know it's the AI ; then if the var is 1, you add other triggers (such as, opponent is close, opponent is in the air, opponent is far away...) to know when the AI should use which moves (uppercut, fireball...)
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Romeotantan

so there isn't any other tutorial out there?

☠Guardian Angel★☃

#10
Winane's AI coding is based on an invisible helper, the one there at MI is based on a Var below the Statedef -1 that triggers moves from the cmd bat at different conditions.

However if you don't know what triggers and the rest of mugen coding does (which seems to be the problem here), you will have to start by reading the mugen docs and playing with coding for some time until you understand what each does. After that you might understand how to use the tutorials and Winane's method.

Cyanide

Ai is character specific. You could not take the triggers from ryu's AI and apply them to kyo because the 2 characters play nothing alike. You'd probably get one set of triggers right and that would be their uppercut.

You need to look at how a character works and code accordingly. If you don't KNOW how to code, you're stuffed. No magic button.

As has been said, winanes is just for activation. A switch if you like, the character works out it's not under control of a human, and turns the switch on, then all your code is turned on as well. If it is under human control, the switch will stay off, and none of the code will be used.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Romeotantan

Then why most of the mugen creators don't implement ai for their chars since it's all about coding? that's why a large number of people try to learn ai coding and a larger number is droping their mugen interests just because of lamness, i mean if i made a character then i must make it competitive or it's out of mugen rosters worldwide, don't every body agree?

Byakko

#13
No, everybody doesn't agree that a competitive AI is more important than everything else.
Because it's more work and not everybody cares about AIs because not everybody wants to sit and watch the computer fight against itself -_- some people just want to spend more time on things that actually matter, and leave the AI for the very end if they even want to make one at all.
If you ask why Mugen creators don't make AIs, I'll just ask back why other people don't do it themselves. Because it's work to do and time to spend. And just as much as "a large number of people" don't want to learn about it and take the time to do it, Mugen creators may not want to do it either.
If you yourself want to make an AI, then you'll learn to do it and you'll take the time it needs. If any Mugen creator wants to make an AI, then he'll take the time it needs. If you don't do it, he may also not do it.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Bastard Mami

most coded in ais end up being easier than the mugen default one, because of predictability.

Romeotantan

Quote from: Byakko on February 07, 2009, 12:02:05 AM
No, everybody doesn't agree that a competitive AI is more important than everything else.
i never said ai is more important than everything else, i said it gives mugen playing a bit of spice and i have tons of chars that have powerfull ai but very lame to play with.

Quote from: Byakko on February 07, 2009, 12:02:05 AM
Because it's more work and not everybody cares about AIs because not everybody wants to sit and watch the computer fight against itself -_- some people just want to spend more time on things that actually matter, and leave the AI for the very end if they even want to make one at all.
If you ask why Mugen creators don't make AIs, I'll just ask back why other people don't do it themselves. Because it's work to do and time to spend. And just as much as "a large number of people" don't want to learn about it and take the time to do it, Mugen creators may not want to do it either.
If you yourself want to make an AI, then you'll learn to do it and you'll take the time it needs. If any Mugen creator wants to make an AI, then he'll take the time it needs. If you don't do it, he may also not do it.
As i said in the first place i'm trying to learn and i don't sit and watch, i play and win a lot cause of lack of ai.

Romeotantan

Quote from: Julia-San~ on February 07, 2009, 12:03:16 AM
most coded in ais end up being easier than the mugen default one, because of predictability.

Agree

Byakko

QuoteAs i said in the first place i'm trying to learn and i don't sit and watch, i play and win a lot cause of lack of ai.
You asked why Mugen creators don't make AIs, I simply gave you an answer : for the same reason "a large number of [other] people" give up. It wasn't a jab at you namely. If you're ready to learn, I have nothing to say other than good luck and feel free to ask if you get stuck, a lot of people will be glad to help you as long as you're ready to listen to their advices.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Romeotantan

Quote from: Byakko on February 07, 2009, 12:58:39 AM
It wasn't a jab at you namely. If you're ready to learn, I have nothing to say other than good luck and feel free to ask if you get stuck, a lot of people will be glad to help you as long as you're ready to listen to their advices.

:) I know u meant nothing and i only felt that i must say these words, i'm a big mugen fan and hate people saying that mugen is dead so i felt i should shout out loud my opinion, and yes i'll try to learn and get back to you guys if i need any help,Thanks

Romeotantan

i can't get the combo chaining code to work, if i chain a crouching weak punch with a weak kick then the character keeps punching weak punches in the air not even hitting his opponent after the first punch made contact, can any one help me? my code goes like this:

[state -1, AI] ;crouching weak punch
type = changestate
value = 400
triggerall = roundstate = 2
triggerall = var(59) = 1
triggerall = p2bodydist x < 35
triggerall = statetype != A
triggerall = random < 300
trigger1 = ctrl

[State -1, AI] ;weak kick
type = ChangeState
value = 210
triggerall = roundstate = 2
triggerall = var(59) = 1
triggerall = statetype != A
trigger1 = random < 800
trigger1 = stateno = 400 && movecontact
trigger1 = ctrl