Re: Multiple Player characters Story mode
I've done it, although it's been a couple months. Here's what I remember adding:
First in StoryModeInfo.cs, add
public StoryModeBattle[] players = new StoryModeBattle[0];
public bool showPlayerInEditor;
in Public Class FightGroups above
public StoryModeBattle[] opponents = new StoryModeBattle[0];
public bool showOpponentsInEditor;
Then in GlobalEditorWindow, add this block of code:
EditorGUILayout.BeginHorizontal();{
battles[i].playerCharacterIndex = EditorGUILayout.Popup("Player:", battles[i].playerCharacterIndex, characterNames);
if (GUILayout.Button("", "PaneOptions")){
PaneOptions<StoryModeBattle>(battles, battles[i], delegate (StoryModeBattle[] newElement) { if (callback != null)callback(newElement); });
return;
}
}EditorGUILayout.EndHorizontal();
In the StoryModeBattleBlock function before this block of code:
EditorGUILayout.BeginHorizontal();
{
battles[i].opponentCharacterIndex = EditorGUILayout.Popup("Opponent:", battles[i].opponentCharacterIndex, characterNames);
if (GUILayout.Button("", "PaneOptions"))
{
PaneOptions<StoryModeBattle>(battles, battles[i], delegate (StoryModeBattle[] newElement) { if (callback != null) callback(newElement); });
return;
}
}
EditorGUILayout.EndHorizontal();
Now in UFE.cs, under public static void _StartStoryModeBattle(float fadeTime), you want to add this line of code at the top of the function if it's not already there:
UFE3D.CharacterInfo character = UFE.GetPlayer(1);
Later in the function, add:
UFE3D.CharacterInfo player = UFE.config.characters[b.playerCharacterIndex];
in between these two lines of code like so:
StoryModeBattle b = currentGroup.opponents[UFE.storyMode.currentBattle];
UFE3D.CharacterInfo player = UFE.config.characters[b.playerCharacterIndex];
UFE3D.CharacterInfo opponent = UFE.config.characters[b.opponentCharacterIndex];
Still under the same function, add:
int playerIndex = UFE.storyMode.currentBattleInformation.playerCharacterIndex;
UFE.SetPlayer1(UFE.config.characters[playerIndex]);
Above this line of code:
int characterIndex = UFE.storyMode.currentBattleInformation.opponentCharacterIndex;
UFE.SetPlayer2(UFE.config.characters[characterIndex]);
Off the top of my head those are all the changes you need to make so that the character is selectable in the editor like the opponents and stages, but if you run into issues let me know and I'll figure out what I left out.
Re: Multiple Player characters Story mode
Amazing!
this creates a new story modes or alter the defualt one?
Re: Multiple Player characters Story mode
Amazing!
this creates a new story modes or alter the defualt one?
It alters the default one. If you want multiple different story modes(like let's say different selectable chapters), you have to work it under unique character stories, and then hardcode it so the selection acts as if you're selecting a character to play their story. Instead of playing a specific story as a singular character, you'd just be playing through a different series of events with whichever characters you choose in the global editor.