News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

making an edited character attack

Started by mysterious gamer, November 15, 2007, 07:31:03 AM

Previous topic - Next topic

mysterious gamer

This is for my own personal use and not distribution. I'm trying to do a character setup where you fight massive enemies at once, something like the strength training bonus. In fact I used it as a base. I was successful in replacing the sprite that appears in battle, and it moves, but getting it to attack won't work.

What should I do? I've integrated some of the files together. So the cmd contains the commands for both characters, in addition I've switched the cns and animation files with the one of the character I'm integrating. What else can I do?

Bastard Mami

it sounds a bit weird; do you only want to sprite swap, or do you want to add more enemies ?

mysterious gamer

Sprite swap essentially. I'm assuming I can add more enemies later. I switched the sprites, got them moving, but failed to get them to use their original attacks...

Bastard Mami

that's weird, it should not get broken if you only switch the sprites, you might have messed up something else in the other files.

mysterious gamer

#4
Simply switching the sff files will allow it to work? Sounds odd, but I was going to originally try it anyway...

EDIT: Starting over, I swapped the air and sff of the character I wanted to have replace the strenght training men, but I still can't get them to attack, they only follow me. What regulates character's attack states. I previously edited the cns, cmd, and st files but with no luck. Will I actually have to recode everything to get this to work?

Bastard Mami

the cmd is what regulates; though i still don't get why are you changing any code if you are only sprite swapping.

mysterious gamer

#6
Well if the sprites wont attack I'm assuming I'll have to recode. The weird thing is that they move, but they don't attack. Is there any way to verifiy that the commands in the cmd are being used by the cpu, or a cpu only?

Cyanide

Erm, isn't this an AI only character? Fight against it in arcade (with just an sff and air swap and see what happens.


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.

mysterious gamer

#8
Generally, in any mode Strength training will work. Even if it's 2p it just starts working. Instead of using it as a base though, I'm thinking of altering the other character's original file. Is there any code I could possiblly use to create a large amount of helpers with the same appearance, movements, attacks, ect?

EDIT: I played around with the character's original file and added helpers (or at least the helper codes from the strenght training character's). Apparently something in that code is preventing it from attacking, but I can't figure what. Would anyone know?

Cyanide

Quote
EDIT: I played around with the character's original file and added helpers (or at least the helper codes from the strenght training character's). Apparently something in that code is preventing it from attacking, but I can't figure what. Would anyone know?

I grant you the cryptic comment award.

We don't really know what you're doing. See the thing is. If you take the original character and swap the sprites over. Then take the original everything else and put it with that sff, MAYBE correcting the animations. It should work. Can't give you more than that without knowing what you've changed and how.


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.

mysterious gamer

Quote from: Cyanide on November 17, 2007, 06:42:05 AM
Quote
EDIT: I played around with the character's original file and added helpers (or at least the helper codes from the strength training character's). Apparently something in that code is preventing it from attacking, but I can't figure what. Would anyone know?

I grant you the cryptic comment award.

We don't really know what you're doing. See the thing is. If you take the original character and swap the sprites over. Then take the original everything else and put it with that sff, MAYBE correcting the animations. It should work. Can't give you more than that without knowing what you've changed and how.

I see, sorry about that I'm trying my best to explain... Initially I was swapping the sff and air files between characters as you've suggested. It worked, however the edited character would not attack it simply moved towards the opponent. I thought adding the cmd and cns (the one of the transferred sprite) to the edited character would allow the character to access its original attacks and movements, but that also didn't work. I even merged the characters st and cns files together with those of the strength training's.

Starting over, I attempted to add the helper codes (all lines with helper in them) of the strength training's states file, to the other character's cns. I duplicated the character like I wanted, but I found that it could not move or attack when I added those codes. So I'm now assuming that it's the coding of the other character that's preventing me from making the sprite attack.

Cyanide

You shouldn't be merging or anything. All you should do is copy paste the strength training's folder, rename it, and all the files in it, then swap the sff file.

If it still doesn't work at that point, i imagine strength training uses animelemtime and your new animations don't go high enough or something. Sorry this is all guess work right now.


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.

Bastard Mami

don't bite more that you can chew. as cyanide said, first get it working JUST swapping sprites. step by step you will be abe to add thousands of charcters to it.

Byakko

#13
You're taking sprites from a character A and adding it to a character B, but you still want your character A to do his own attacks even if he's in character B's files, do I get that right ? B does not originally have the move at all, not even the coding, is that it ?
In that case, then yes, only having the sprites and animations is not enough if B did not originally have the move. The animation alone is nothing, it's just a sequence of pictures. You do need to copy the corresponding statedef from A's files, as well as the command part that tells A to go to that corresponding statedef.

cmd tells the character to go to a given statedef upon command input
cns says exactly what happens during the move, and tries to display an animation from the air ; it goes from the start of the animation until it gets back to its statedef 0 (standing state)
the air file is a suite of numbers that refer to sprites in the sff.

Given that, if you're trying to add the whole move of A into B, including the movement, animation, effects, then yes, you need to add all the bits that make up the movement : cmd, cns, air, sff corresponding parts.

Don't forget that the statedef numbers must be unique. Meaning, if in A the statedef number used is 1650, then when adding that statedef into B, you need to make sure that number isn't already used. If it is, you have to change it for a unique one. Ditto for the animations.

But once again, as Cyanide and [E] said, it's a lot, and it takes time to understand each part of it. But if you want to persevere, please make sure to point out in which part (of the list I gave) things go missing.
In fact, ideally, actually post exactly what you transfer from A to B - post the added code as well. We need as much information as you can provide.
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.

mysterious gamer

Quote from: Baiken on November 17, 2007, 05:39:58 PM
You're taking sprites from a character A and adding it to a character B, but you still want your character A to do his own attacks even if he's in character B's files, do I get that right ? B does not originally have the move at all, not even the coding, is that it ?
In that case, then yes, only having the sprites and animations is not enough if B did not originally have the move. The animation alone is nothing, it's just a sequence of pictures. You do need to copy the corresponding statedef from A's files, as well as the command part that tells A to go to that corresponding statedef.

cmd tells the character to go to a given statedef upon command input
cns says exactly what happens during the move, and tries to display an animation from the air ; it goes from the start of the animation until it gets back to its statedef 0 (standing state)
the air file is a suite of numbers that refer to sprites in the sff.

Given that, if you're trying to add the whole move of A into B, including the movement, animation, effects, then yes, you need to add all the bits that make up the movement : cmd, cns, air, sff corresponding parts.

Don't forget that the statedef numbers must be unique. Meaning, if in A the statedef number used is 1650, then when adding that statedef into B, you need to make sure that number isn't already used. If it is, you have to change it for a unique one. Ditto for the animations.

But once again, as Cyanide and [E] said, it's a lot, and it takes time to understand each part of it. But if you want to persevere, please make sure to point out in which part (of the list I gave) things go missing.
In fact, ideally, actually post exactly what you transfer from A to B - post the added code as well. We need as much information as you can provide.

Thank you for your reply. I do realize I was very vague, but I believe it would be a simpler process. I actually replaced the Cns and cmd of character B (strength training) with those of character A. Actually, strength training's cns and cmd are very basic, and can be removed fairly easily; most of it's codes reside in its .st file. I'm having trouble understanding what in the st is preventing my character from attacking.

I copied certain codes with the word "helper(s)" from that particular st and placed them into character A's cns. I found that I generated helpers, but none of them could attack. I know that's a very crude way to go implementing helpers into a character, but do you think that it's possibly a sign that the helper codes could be preventing my character from attacking?

Cyanide

Ok, so you've included some of your own stuff in what should have been a simple sprite swap.

None of your "own code" please. Make use of the current characters EVERYTHING, except SFF file.


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.

Byakko

QuoteI copied certain codes with the word "helper(s)" from that particular st and placed them into character A's cns. I found that I generated helpers, but none of them could attack. I know that's a very crude way to go implementing helpers into a character, but do you think that it's possibly a sign that the helper codes could be preventing my character from attacking?
Hm... When you want to generate a helper, you give it a state number to start at. If you copied a piece of code that was like
[state blah, blah]
type = helper
...
stateno = numberhere
...

then did you also look for the statedef corresponding to that "numberhere" ? You have to copy that state, since it's what tells the helper what to do.
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

actually once you get the sff swap working; you are not going to exchange the cmd and cns files; but rather add the new character's st file to the old's st file; while doing edit to the cmd and air files.

Byakko

Nobody talked about "switching" the files.
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.

mysterious gamer

#19
Quote from: Baiken on November 18, 2007, 12:03:53 PM
QuoteI copied certain codes with the word "helper(s)" from that particular st and placed them into character A's cns. I found that I generated helpers, but none of them could attack. I know that's a very crude way to go implementing helpers into a character, but do you think that it's possibly a sign that the helper codes could be preventing my character from attacking?
Hm... When you want to generate a helper, you give it a state number to start at. If you copied a piece of code that was like
[state blah, blah]
type = helper
...
stateno = numberhere
...

then did you also look for the statedef corresponding to that "numberhere" ? You have to copy that state, since it's what tells the helper what to do.

Oh, I found it, but the characters alread did that. It refers to "appearing" would I have to add the statedef for attacking to the characters?