How to make an asymmetric char ?

16-bit Fighter

Active member
Does anyone know if there is a mod which has an asymmetric character in its roster (I just know there are some in Mugen) ? If not, could you give a way to make this type of character, please ?
 
Its doable, but it will require some scripting. Or, you can make a secondary entity, as a wepon, to be used when the character is facing left, rather facing right (normal character).
 
Thanks, it's the same solution I've thought of. Thus must I put script in every animation in which the char (can) toss ? If so, what are all these animations in which default char (both player and enemies) is able to toss ? I suppose there are idle and walk. Is that all ?
 
You could just add the weapon switch in the TURN animation.

Weapons chars can be setup using modelflag setting.  So the weapon model will only need the animations that have changed.  So for example if the only animations that will change are ATTACK2 and WALK then that's all you need to add, the rest will carry over from the original char. 

Code:
modelflag {int}

    ~Determines how weapon model copies animation and weaponlist from original model.
        0 = Animation and weaponlist are copied
        1 = Animation aren't copied but weaponlist are still copied
        3 = Animation and weaponlost aren't copied
    ~Use this with weapon models of course.

References in the manual,

WEAPONS
http://dcemulation.org/?title=OpenBORManual#Weapons

USING WEAPONS
http://dcemulation.org/?title=OpenBORManual#Using_Weapons

 
Thanx BeasTie, I didn't know this trick. But given my idea is to make a Gill-like char (hence the need of differentiating the two directions), I guess it's not the right solution.
 
16-bit Fighter said:
Thanx BeasTie, I didn't know this trick. But given my idea is to make a Gill-like char (hence the need of differentiating the two directions), I guess it's not the right solution.

Actually what Beastie said would work for the most part - except you have to remember that turning around doesn't just happen when you walk the other way. Time overs, spawning, getting hit, grabbing an enemy, there are all kinds of situations that can make you change direction and many of them are not player controlled. You really need to use a script to do the switching if you want it to be stable.

As far as making a whole new model, that sort of depends. If you are talking about Gill specifically, it's not really needed because Gill and similar characters are not truly asymmetric - he simply swaps colors when turning around and uses different effects on his moves. He's really a better of example of smart palettes than anything else.

  • An animation script monitors direction on each frame. If facing one direction, use palette set X. Otherwise, palette set Y. This puts all of your left/right swapping logic in one spot and covers every situation that might change your direction.
  • On specific attack animations, if you are facing one way, change the attack to match (As in, Gill's kicks hitting with an ice effect or fire effect).

Now if you are talking about a truly asymmetric character with different sprites for either direction, a weapon model as Beastie described is really the only way to go, though I'd still recommend using script to do the switching - as above, you can't possibly hope to cover every in game situation where your direction might change by putting in weapon swaps manually. In that case, the script would just swap your model instead of the palette.

DC
 
Thanks for this good suggestion, DC ! I guess if I upstream think about how to design the colors of the sprites in a smart way, the palette change way will work well for the char I think of (about ?). I'ts a real Gill-like char (symetric, besides its colors) but without the different attacks depending on its direction.
But at this time, I don't know how to process, especially when the char is tossed during a slam done by an adversary. Sorry if say a stupid thing but is it possible to create a event listener of changing direction ?
 
16-bit Fighter said:
Sorry if say a stupid thing but is it possible to create a event listener of changing direction ?

Not exactly - you'd just use what's called an update script. It's a script that runs on every engine cycle rather than on specific singular events. That update script would do the switch monitoring. You generally want to keep update scripts to a minimum, but so long as you use them just for things only they can do, it's no biggie at all.

DC
 
Thanks, I think I get the point. The update script nonstop runs and must remain light to do not use too much RAM.
I'll look into some examples to learn about it.
 
Actually what Beastie said would work for the most part - except you have to remember that turning around doesn't just happen when you walk the other way.
Plus, the weapon change is kinda abrupt. Whenever you tell the character to change weapon, it will change instantily. There is no "weapon get" animation.
 
Please, don't clash because of me. ^^'
I'm really not in a hurry and maybe I prefer reading best solution and then search by myself how to do it while I'm getting familliar with script language. And if I don't find a effective script, I'll come back in here to know why my script doesn't success.
 
I found an old and quite similar topic and I used the way msmalik681 wrote. Unfortunately, nothing happens when I test it.

The character I'm making tests on is not an asymmetric char but I choose him just for test.
Anyway, in order to receive your help, here is what is about the palette and the switch palette on the header :
Code:
updatescript	data/scripts/forcemap.c

palette data/chars/bret/bret.gif #1
remap	data/chars/bret/bret.gif	data/chars/bret/alter1.gif

Here is the update script (forcemap.c) :
Code:
void main()
{
	void self = getlocalvar("self");
	int dir = getentityproperty(self,"direction");

	if(dir == 0){
	changeentityproperty(self, "map", 0);
	}
	else{
	changeentityproperty(self, "map", 1);
	}
}

Moreover, I can say in Log.txt there is this line :
Code:
Command 'updatescript' not understood in file 'data/chars/bret/bret.txt'!

I don't understand this "not understood"...
 
Put this in your character header

script @script
void main()
{
void self = getlocalvar("self");
int dir = getentityproperty(self,"direction");

if(dir == 0){
changeentityproperty(self, "map", 0);
}
else{
changeentityproperty(self, "map", 1);
}
}@end_script

and remove the updatescript bla bla bla line.
 
Thanks, there is abviously a palette change, but in Direction 1 the char becomes all black (except during some frames where there are a few pixels of other colours). However it's not a problem with the 2nd palette because when I manually turn it on the first palette, the char has properly this alternative colour (and off course if he faces the opposite direction, he becomes all black as well).
Is there nothing wrong with this combination of lines below ?

Code:
palette data/chars/bret/bret.gif #1
remap	data/chars/bret/bret.gif	data/chars/bret/alter1.gif
 
Yep. Remap is the wrong command. Its an antiquated command for 8bit screen mode that remaps using pixel by pixel comparasion, not color table reading.

Alternatepal is what you should be using.

DC
 
Because (somebody correct me if I am wrong), there is no updatescript for entity header. This is should be used for stages.
For entities, it should be script.
 
Back
Top Bottom