YesNoOk
avatar

The MUGEN Docs Master Thread (Read 59132 times)

Started by Just No Point, September 08, 2015, 05:51:36 pm
Share this topic:
The MUGEN Docs Master Thread
New #1  September 08, 2015, 05:51:36 pm
  • ******
    • www.justnopoint.com/
This board is an experiment to enhance the MUGEN Docs.
To view the MUGEN 1.0 Docs that are being updated to work in conjunction with this forum click here

As new threads are made in this board this sticky will be updated with their link. To more easily find a topic.

Please attempt to discuss Ctrl/triggers, etc as they are posted. Add examples if you choose. Discuss the bugs, undocumented features, and all around make them less vague and/or more detailed.
If you have specific questions about a ctrl/trigger, whatever is posted here feel free to ask in the thread as well. There is no rule against necro bumping here. Or double posting with more info.

All Docs are 1.0 and are the same as 1.1 unless noted otherwise. In the event something is different in both versions you will see 1.0 +1.1b while some may only note they are 1.1b if they are 1.1b exclusive.

ReadMe.txt
mugen.cfg 1.0 + 1.1b
select.def
Overview
Contents and Files
Coordinate space notes
Languages and localization
Looping BGM guide
Mugen 101: Things you need to know
SFFv1 SFFv2 SFFv2.1
The Sprite Standard
The DEF file
Air Format 1.0 + 1.1b
The CMD file
StateDef - 2 and StateDef - 3
Character Tutorial 1
Character Tutorial 2
Character Tutorial 3
Character Tutorial 4
Stage/backgrounds Tutorial
M.U.G.E.N Console 1.1b exclusive
Update History
MUGEN Crashes Compilation
Hardcoded things in MUGEN


About Triggers
This is an alphabetical index of function-type triggers. For details on use of function-type triggers in expressions, see the expression documentation. Unless otherwise specified, we will use P1 to represent the player who is evaluating the trigger, and P2 to represent his opponent (usually the closest opponent when in team mode).

Some triggers are nonstandard and cannot take expressions as their arguments. These are marked with a (*) in the index. Some triggers are deprecated; these are marked with a (**). Use of these triggers is not encouraged, as support for them may be removed in future versions of the engine.

Old-style triggers, marked (***), appear only in clauses of the form (trigger) (relational operator) (value). See section 8 of exp.doc for more details.

Triggers used for math are marked with (math).

For all triggers, bottom will be returned if the trigger is redirected to a nonexistent destination, or if the ID number for the redirection evaluates to bottom. This is not listed in the error conditions for each trigger.

Abs (math)
Acos (math)
AILevel
Alive
Anim
AnimElem(*,***)
AnimElemNo
AnimElemTime
AnimExist
AnimTime
Anim VS AnimElem VS AnimElemNo VS AnimElemTime VS AnimTime
Asin (math)
Atan (math)
AuthorName(*,***)
BackEdge 1.1b Exclusive
BackEdgeBodyDist
BackEdgeDist
BottomEdge 1.1b Exclusive
CameraPos 1.1b Exclusive
CameraZoom 1.1b Exclusive
CanRecover
Ceil (math)
Command (*,***)
Cond (math)
Const (*)
Const240p
Const480p
Const720p
Cos (math)
Ctrl
DrawGame
E (math)
Exp (math)
Facing
Floor (math)
FrontEdge 1.1b Exclusive
FrontEdgeBodyDist
FrontEdgeDist
FVar
GameHeight
GameTime
GameWidth
GetHitVar(*)
HitCount
HitDefAttr(*,***)
HitFall
HitOver
HitPauseTime
HitShakeOver
HitVel
ID
IfElse (math)
InGuardDist
IsHelper
IsHomeTeam
LeftEdge 1.1b Exclusive
Life
LifeMax
Ln (math)
Log (math)
Lose
MatchNo
MatchOver
MoveContact
MoveGuarded
MoveHit
MoveType(*,***)
MoveReversed
Name(*,***)
NumEnemy
NumExplod
NumHelper
NumPartner
NumProj
NumProjID
NumTarget
P1Name(*,***)
P2BodyDist
P2Dist
P2Life
P2MoveType
P2Name(*,***)
P2StateNo
P2StateType
P3Name(*,***)
P4Name(*,***)
PalNo
ParentDist
Pi (math)
Pos
P2BodyDist VS P2Dist VS Pos
Power
PowerMax
PlayerIDExist
PrevStateNo
ProjCancelTime
ProjContact(*,***)
ProjContactTime
ProjGuarded(*,***)
ProjGuardedTime
ProjHit(*,***)
ProjHitTime
Random
RightEdge 1.1b Exclusive
RootDist
RoundNo
RoundsExisted
RoundState
ScreenPos
ScreenHeight 1.1b Exclusive
ScreenWidth 1.1b Exclusive
SelfAnimExist
Sin (math)
StateNo
StateType
StageVar(*,***)
SysFVar
SysVar
Tan (math)
TeamMode(*,***)
TeamSide
TicksPerSecond
Time
TimeMod(*,**,***)
TopEdge 1.1b Exclusive
UniqHitCount
Var
Vel
Win

Don't forget your Trigger Redirections!
parent
root
helper
helper(ID)
target
target(ID)
partner
enemy
enemy(n)
enemyNear
enemyNear(n)
playerID(ID)




CNS Format
The CNS file of a player serves two purposes:

It defines the variables of that player, such as walking speed, drawing scale factor, and so on.
It contains the states of the player, which describe all the moves that the player can do. States are the building blocks that you can use to create simple as well as complicated moves.
Like many other character files, the CNS is a text file that you can edit with any text editor.

In the CNS file, a semicolon (;) is considered a "comment" character. Any text on the same line after the semicolon will be ignored by the program. The CNS is mostly case-insensitive, i.e. "MyName" is treated the same as "myname" and "mYnAMe". The one exception is the command trigger (covered in detail in the CMD documentation).

Some terminology
Player Variables
States
Introduction to States
Life and power
Control
Game-time and state-time
Position, velocity and acceleration
Juggling
Basic Parts of a State
Details on StateDef
type
movetype
physics
anim
velset
ctrl
poweradd
juggle
facep2
hitdefpersist
moveHitPersist
hitcountpersist
sprpriority
Details on State Controllers
Controller Format

Triggers
Trigger Logic

Trigger Persistency
Commonly-used controllers
Common states (common1.cns)
Special State Numbers
Expressions
Data types

Arithmetic Operators
Precedence and associativity of operators
Expression syntax
Condition- and function-type triggers
Trigger redirection
Bottom
Special Forms
Avoiding warnings
Expressions in trigger arguments
Expressions in state and state controller parameters
Organizing for efficiency

Trigger and Controller alternatives
Last Edit: February 15, 2017, 05:14:23 pm by Just No Point
Re: The MUGEN Docs Master Thread
New #2  September 08, 2015, 06:25:29 pm
  • ******
    • www.justnopoint.com/
About State Controllers

All state controllers have two optional parameters, "persistent" and "ignorehitpause". These must be set to integer constants. Unless otherwise specified, any other numeric state controller parameter can be specified with an arithmetic expression.

In all cases, if setting a parameter with an expression, you should be careful that the expression does not evaluate to bottom, as in this case the parameter will be set to 0.


AfterImage
AfterImageTime
AllPalFX
AngleAdd
AngleDraw
AngleMul
AngleSet
AppendToClipboard
AssertSpecial
AttackDist
AttackMulSet
BGPalFX
BindToParent
BindToRoot
BindToTarget
ChangeAnim
ChangeAnim2

ChangeState
ClearClipboard
CtrlSet
DefenceMulSet
DestroySelf 1.0 + 1.1b
DisplayToClipboard
EnvColor
EnvShake
Explod 1.0 + 1.1b
ExplodBindTime
ForceFeedback
FallEnvShake
Gravity
Helper 1.0 + 1.1b
HitAdd
HitBy
HitDef
HitFallDamage
HitFallSet
HitFallVel
HitOverride
LifeAdd
LifeSet
ModifyExplod
MoveHitReset
NotHitBy
Null
Offset
PalFX
ParentVarAdd
ParentVarSet
Pause
PlayerPush
PlaySnd
PosAdd
PosFreeze
PosSet
PowerAdd
PowerSet
Projectile 1.0 + 1.1b
RemapPal 1.0 + 1.1b
RemoveExplod
ReversalDef
ScreenBound
SndPan
SelfState
SprPriority
StateTypeSet
StopSnd
SuperPause
TargetBind
TargetDrop
TargetFacing
TargetLifeAdd
TargetPowerAdd
TargetState
TargetVelAdd
TargetVelSet
Trans 1.0 + 1.1b
Turn
VarAdd
VarRandom
VarRangeSet
VarSet
All things Variables. A Variables Tutorial
VelAdd
VelMul
VelSet
VictoryQuote
Width
Zoom 1.1b Exclusive

Spoiler: Deprecated State Controllers (click to see content)



Background / stage documentation
Overview
Description of stage settings

Info Group 1.0 + 1.1b
Camera Group 1.0 + 1.1b
PlayerInfo Group
Bound Group
StageInfo Group
Shadow Group 1.0 + 1.1b
Reflection Group
Music Group
Description of background elements
Format or background elements
Static background elements
Animated background elements
Parallaxing background elements
Advanced Parameters
Other background element types
Background controllers
Simple Example




Storyboard documentation
Overview
Terminology

Getting Started
Cutscenes Events

Trying It Out
Viewing Storyboards
Storyboard Basics
Testing Your Storyboard
Parameter Reference
Info Parameter Reference
SceneDef Parameter Reference

Scene Parameter Reference



Font Documentation
Overview
Terminology

FNT v2 def file
Bitmap fonts

ASCII character reference
TrueType Fonts
Last Edit: March 15, 2017, 07:10:12 am by Odb718
Re: The MUGEN Docs Master Thread
#3  September 08, 2015, 09:47:49 pm
  • ****
  • Retired.
  • Formerly Known As Genesis
    • www.mediafire.com/folder/7j1slkpa7lm0w/Public_Works
Feel free to remove this post afterwards, I don't want to ruin the organization for this at all.

I was gonna propose something like this a few weeks back, but I didn't have a detailed plan on how it should be done. This seems effective.
I skimmed over the first post, but it seems very similar to what I had in mind. The only difference being, I was gonna suggest creating a sort of trial for new users to help them become accustomed to coding in general. Perhaps that could be a separate thing under Mugen Dev Help?
I do understand that this is for new and experienced people.

There is a also a baby typo in the first post (could be more, haven't read it thoroughly)
Quote
If you wish to discuss a certain document, trigger, whatever in MUGEN post in this thread and I'll male the post for it.
Re: The MUGEN Docs Master Thread
#4  September 08, 2015, 10:05:21 pm
  • ******
    • www.justnopoint.com/
Thanks. Fixed the typo. If I didn't want anyone to post I'd have locked the thread so you're perfectly fine :)

You can still make the trial. I was doing similar in the MFG SF board and intend to expand on it. I don't even know if this will get a lot of attention but figured it wouldn't hurt to give it a shot.

I've got a lot of ideas to try and help ease people into creation that may feel overwhelmed. This is just one of them. I'm sorta baby stepping it. Trying to build a certain momentum not only on the boards but for myself.

If you created a trial or anything that you think could assist people just let me know and I'll try and promote it accurately.
Re: The MUGEN Docs Master Thread
#5  September 08, 2015, 10:07:35 pm
  • ******
Re: The MUGEN Docs Master Thread
#6  September 08, 2015, 10:13:18 pm
  • ******
    • www.justnopoint.com/
I added those 2 triggers threads if you wanted to basically repeat what you said in each.
Re: The MUGEN Docs Master Thread
#7  September 08, 2015, 10:21:39 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
:yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes:
This is a great idea!
:yes: :yes: :yes: :yes: :yes: :yes: :yes: :yes:

If I may make a suggestion, I think you should get a topic going for Trigger Redirections.  If that was already planned, than I suggest posting it sooner rather than later :)

This topic will surely have discussion, because it is very useful, and not adequately detailed in the documentation IMO.


I'm sure you know where it is... a subtopic down towards the bottom of "Expressions" documentation

Re: The MUGEN Docs Master Thread
#8  September 08, 2015, 10:43:50 pm
  • ******
    • www.justnopoint.com/
I added it. Let me know if there is a better way to segment these out. I realized I need to be differentiating which doc each comes from. Like Trigger Redirection should say CNS

All the Triggers should say Trigger in their title.

Also to remind anyone reading any of these threads that if you have a question about any of the subjects to feel free to ask in thread!
Last Edit: September 08, 2015, 10:50:07 pm by Just No Point
Re: The MUGEN Docs Master Thread
#9  September 09, 2015, 05:53:46 pm
  • ******
    • www.justnopoint.com/
@altoiddealer: Where's all that great Trigger Redirection discussion you promised??? .V.

Going to go ahead and add the rest of the Anim Triggers today. Thanks already for all the detailed posts on each trigger thus far! (Won't be using AnimElem)
Re: The MUGEN Docs Master Thread
#10  September 10, 2015, 02:29:47 am
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
@Just No Point: I didn't "promise" anything!   :beatnik:

Ok I posted a useful technique in the Redirection thread to take advantage of the "Player(ID)," redirection.

Last Edit: September 10, 2015, 02:51:11 am by altoiddealer
Re: The MUGEN Docs Master Thread
#11  September 10, 2015, 04:16:58 pm
  • **
  • Vwee?
    • USA
As someone who is trying to cross the border between lurker and creator.. I vastly appreciate what is starting to happen here..  I'll be paying close attention to this as I want to know ALL the knowledge.   ^_^   Or... anything that doesn't go right over my head...  (Anything with MATH written after it.)  x3
Delving within the depths of a castle full of evil.. or at least lost or even trapped within one.. That's where you'll find me.
Re: The MUGEN Docs Master Thread
#12  September 10, 2015, 04:31:25 pm
  • ******
    • www.justnopoint.com/
If something isn't made clear feel free to ask in the threads too. Their second purpose is to be for someone with a question.
I hope this aids you!
Re: The MUGEN Docs Master Thread
#13  September 10, 2015, 04:44:39 pm
  • ***
  • The Man Without The Plan
    • USA
Dude, you're amazing. Now I can understand M.U.G.E.N more! :D
Re: The MUGEN Docs Master Thread
#14  September 10, 2015, 05:01:54 pm
  • **
  • Vwee?
    • USA
If something isn't made clear feel free to ask in the threads too. Their second purpose is to be for someone with a question.
I hope this aids you!

It IS.  Very much so.. I've already started to change some of my AI triggers because of it.  I just know that some I won't get.. not because Mugen but because Math..  I.E. Acos (math) trigger isn't just basic math.. it's trigonometry.  Not something I've studied in about 10 years.. nor do I want to, honestly.   lol    Maybe I'll break out some old textbooks later.  xD
Delving within the depths of a castle full of evil.. or at least lost or even trapped within one.. That's where you'll find me.
Re: The MUGEN Docs Master Thread
#15  September 10, 2015, 05:09:54 pm
  • ******
    • www.justnopoint.com/
My school didn't even offer trigonometry :P
That's why I'm being sure to promote the math triggers the most in Doc of the Day.
@Bea: Can you try to keep an eye on this board every so often and help explain some of the math triggers to those of us mathmatically challenged? :)
Last Edit: September 10, 2015, 08:59:05 pm by Just No Point
Re: The MUGEN Docs Master Thread
#16  September 10, 2015, 09:51:35 pm
  • ******

Bea

Re: The MUGEN Docs Master Thread
#17  September 10, 2015, 10:46:04 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
My school didn't even offer trigonometry :P
That's why I'm being sure to promote the math triggers the most in Doc of the Day.
@Bea: Can you try to keep an eye on this board every so often and help explain some of the math triggers to those of us mathmatically challenged? :)

I will try to. Keep in mind that I am now a grumpy old woman now, so instead of explaining them, I might beat them into your brains with my cane. :P
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: The MUGEN Docs Master Thread
#18  September 10, 2015, 11:37:15 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
All hail Mrs. Rottenmaier!!!
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!
Re: The MUGEN Docs Master Thread
#19  September 13, 2015, 01:19:57 am
  • ******
    • www.justnopoint.com/
Added new ones a bit early as because I wake up way too early and have to get ready for work so I wouldn't be able to add any. Here's hoping I get to make the Doc of the Day.
Re: The MUGEN Docs Master Thread
#20  September 16, 2015, 05:40:42 pm
  • ******
    • www.justnopoint.com/
I'll be prioritizing threads that have pending questions for DOC of the Day. I see RicePigeon and Kamekaze have questions pending. Hopefully that'll gauge someone that may happen to click it and know the answer.

If you have posted an image in any of the Class threads you'll notice I edited your posts. All I did was upload the image to Guild's server so we won't have to worry about broken images in the future.

Unless Guild stops existing. Then I guess it wouldn't matter about where the image was hosted! :P
Last Edit: September 16, 2015, 06:00:37 pm by Just No Point