Topic: Story Mode Always Select the Story of First Character[SOLUTION]

My Brother StridrSpinel noticed that when useSameStoryForAllCharacters is off UFE always selects the Story of the fisrt Character on the list of characters and not the One Selected, so for a few hours dedicated to search for this error and found a solution and I share it to anyone who has this issue


On UFE.cs change

public static CharacterStory GetCharacterStory(CharacterInfo character){
        if (!UFE.config.storyMode.useSameStoryForAllCharacters){
            for (int i = 0; i < UFE.config.characters.Length; ++i){
                int index = UFE.config.storyMode.selectableCharactersInStoryMode.IndexOf(i);
                //CHANGE THIS IF
                if (UFE.config.characters[i] != null && index >= 0){
                    
                   //CHANGE THIS RETURN   
                   return UFE.config.storyMode.characterStories[index];
                }
            }
        }
        
        return UFE.config.storyMode.defaultStory;
    }

public static CharacterStory GetCharacterStory(CharacterInfo character){
        if (!UFE.config.storyMode.useSameStoryForAllCharacters){
            for (int i = 0; i < UFE.config.characters.Length; ++i){
                int index = UFE.config.storyMode.selectableCharactersInStoryMode.IndexOf(i);
                // NEW IF ADDS CHARACTER COMPARISON 
                if (UFE.config.characters != null && (UFE.config.characters[i].name+"(Clone)")==character.name && index >= 0){
                    // NEW RETURN SENDS THE CORRECT INDEX
                     return UFE.config.storyMode.characterStories[i];
                }
            }
        }
        
        return UFE.config.storyMode.defaultStory;
    }

So now the correct storycharacter Story is selected, I hope It could hepfull no everyone

Share

Thumbs up +3 Thumbs down

2 (edited by w2pfvn 2017-11-17 03:58:44)

Re: Story Mode Always Select the Story of First Character[SOLUTION]

Please help me in this issue. I create many prefabs for each character story mode but game is alway show one story for all character. Although I untick same story and using different prefabs.

PunBB bbcode test

I create prefab 1&2 with script StoreModeTextureScreen. But game only show content of prefab 2 for story 1&2. Prefab 1 not show. Please help me sad

Share

Thumbs up Thumbs down

Re: Story Mode Always Select the Story of First Character[SOLUTION]

have you tried implementing the solution above?

Me encontraste en un negro camino como un peregrino sin rumbo ni fe, pero la luz de tus ojos divinos cambió mi suerte por dicha y placer.

4 (edited by w2pfvn 2017-11-17 22:04:32)

Re: Story Mode Always Select the Story of First Character[SOLUTION]

Thank you for you respon. I was tried this solution. And have two problems. When I unused code, story mode load prefabs of story 2 (if I create character story 3, game will load prefabs of character story 3 for all story. And if have character story 4, prefabs of story 4 will load for story 1,2,3). When I change code at UFE.cs, game will load origin prefabs (ex: TextureStoryModeOpeningScreen, TextureConversationBeforeBattleScreen. Although I drop different prefabs for each slot).

Share

Thumbs up Thumbs down