• Hey, guest user. Hope you're enjoying GameParadise! Have you considered registering for an account? Come join us and add your take to the daily discourse.

How to add erect or remix difficulties SOURCE CODE



66bc0d848b8d7.jpg


How to add erect or remix difficulties SOURCE CODE How to add erect or remix difficulties SOURCE CODE

Finally a tutorial on how to achieve this

Prerequisites

  • Your Inst-{difficulty} and Voices-{difficulty} files
  • Your difficulty's chart
  • Your difficulty's image

Step 1: Placing Your Assets

  • Inst and Vocal Files:
    • Place your inst and vocal files into: assets/songs/{song}
  • Chart:
    • Name your chart as {song}-{difficulty} and place it in: assets/shared/data/{song}
  • Difficulty Image:
    • Place your difficulty image into: assets/shared/images/menudifficulties

Step 2: Adding the Difficulty

  • Adding Difficulty Through Source Code:

  • Open Difficulty.hx
  • Add your difficulty to the list:
    'Hard',
    '{difficulty}'
  • Adding Difficulty in the Week Editor:
    • Open your Psych Engine build and press 7
    • Scroll down and open the Week Editor
    • Create or open the week you want to edit and go to the "Other" tab
    • In the "Difficulties" box, add all the difficulties your week will include
    • Save your week

Step 3: Configuring the Remix Difficulty

  1. Update Paths.hx:
    • Find and update the following code blocks:
      Code:
      inline static public function voices(song:String, postfix:String = null):Any
      {
          var songKey:String = '${formatToSongPath(song)}/Voices';
          if(postfix != null) songKey += '-' + postfix;
          var voices = returnSound(null, songKey, 'songs');
          return voices;
      }
      Code:
      inline static public function inst(song:String):Any
      {
          var songKey:String = '${formatToSongPath(song)}/Inst';
          var inst = returnSound(null, songKey, 'songs');
          return inst;
      }
    • Add the new difficulty code:
      Code:
      inline static public function voices{difficulty}(song:String, postfix:String = null):Any
      {
          var songKey:String = '${formatToSongPath(song)}/Voices-{difficulty}';
          if(postfix != null) songKey += '-' + postfix;
          var voices{difficulty} = returnSound(null, songKey, 'songs');
          return voices{difficulty};
      }
      Code:
      inline static public function inst{difficulty}(song:String):Any
      {
          var songKey:String = '${formatToSongPath(song)}/Inst-{difficulty}';
          var inst{difficulty} = returnSound(null, songKey, 'songs');
          return inst{difficulty};
      }
    • Replace {difficulty} with your actual difficulty name in all instances of Erect.
  2. Update PlayState.hx:
    • Find the existing code:
      Code:
      try
      {
          if (songData.needsVoices)
          {
              var playerVocals = Paths.voices(songData.song, (boyfriend.vocalsFile == null || boyfriend.vocalsFile.length < 1) ? 'Player' : boyfriend.vocalsFile);
              vocals.loadEmbedded(playerVocals != null ? playerVocals : Paths.voices(songData.song));
      
              var oppVocals = Paths.voices(songData.song, (dad.vocalsFile == null || dad.vocalsFile.length < 1) ? 'Opponent' : dad.vocalsFile);
              if(oppVocals != null) opponentVocals.loadEmbedded(oppVocals);
          }
      }
    • Replace it with:
      Code:
      try
      {
          if (songData.needsVoices)
          {
              if (storyDifficulty == 3)
              {
                  var playerVocals = Paths.voices{difficulty}(songData.song, (boyfriend.vocalsFile == null || boyfriend.vocalsFile.length < 1) ? 'Player-{difficulty}' : boyfriend.vocalsFile);
                  vocals.loadEmbedded(playerVocals != null ? playerVocals : Paths.voices{difficulty}(songData.song));
      
                  var oppVocals = Paths.voices{difficulty}(songData.song, (dad.vocalsFile == null || dad.vocalsFile.length < 1) ? 'Opponent-{difficulty}' : dad.vocalsFile);
                  if(oppVocals != null) opponentVocals.loadEmbedded(oppVocals);
              }
              else
              {
                  var playerVocals = Paths.voices(songData.song, (boyfriend.vocalsFile == null || boyfriend.vocalsFile.length < 1) ? 'Player' : boyfriend.vocalsFile);
                  vocals.loadEmbedded(playerVocals != null ? playerVocals : Paths.voices(songData.song));
      
                  var oppVocals = Paths.voices(songData.song, (dad.vocalsFile == null || dad.vocalsFile.length < 1) ? 'Opponent' : dad.vocalsFile);
                  if(oppVocals != null) opponentVocals.loadEmbedded(oppVocals);
              }
          }
      }
    • Find and update:
      Code:
      try
      {
          inst.loadEmbedded(Paths.inst(songData.song));
      }
    • Replace it with:
      Code:
      try
      {
          if (storyDifficulty == 3)
          {
              inst.loadEmbedded(Paths.inst{difficulty}(songData.song));
          }
          else
          {
              inst.loadEmbedded(Paths.inst(songData.song));
          }
      }

Final Note

You may credit me if you find this tutorial helpful!


Feel free to change the placeholders like {difficulty} to your difficulty.
About author
admin
Avid gamer.

Comments

There are no comments to display.

PC/MAC Tutorial information

Author
Chad Waliser
Article read time
2 min read
Views
4,518
Last update

More in PC/MAC

More from Chad Waliser

Share this pc/mac tutorial

Back
Top