Sunday, July 21, 2019

XCOM 2 Voice Mod Tutorial Walkthrough


   Making a voice mod for XCOM 2 & (WOTC) can be a bit daunting for people new to modding XCOM 2. I took these notes to help myself create more in the future, as to not forget what I learned along the way. I hope this can be helpful to you as well.

You can check out this mod here on the Nexus: https://www.nexusmods.com/xcom2/mods/731

 Install

    Steam
    Download the XCOM 2 Development Tools
    Download the XCOM 2 War of the Chosen Development Tools
      ^Then right click it in steam and go to the "Betas" tab and select "full_content-" It's like a 56gb download.
      While you are here in the General Tab disable "Enable the Steam Overlay while in-game"
    Runs the Two "redistributables" here: Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\Binaries\Redist

Resources

Google Doc on the process:
Unofficial XCOM 2 Voicepack Tutorial By E3245 - Google Docs

XCOM 2 Voice Pack Modding Tutorial V2


Xcom 2: SDK Quick Start PDF


Xcom 2: Guide Troubleshooting Generate Sound Banks
Unofficial XCOM 2 Voicepack Tutorial By E3245 - Google Docs 

The Google Docs are too long winded and the Youtube video misses critical steps, So here is my guide.

Audacity Settings

We can record audio from our desktop by using Audacity. These settings can lag so you might need to rerecord. Always check your recorded clip.

Edit/ Preferences
  Quality:
    Set Default Sample Rate to 44100 Hz
    Default Sample Format 16-bit
    
Make sure the Project Rate (HZ) at the bottom left is set to 44100

Recording

Make sure your source volume is consistent across your recordings.

Noise Reduction

Select a chunk for a Noise Profile and then go to:
Effect / Noise Reduction
Hit the "Get Noise Profile" Button.
Now select the entire clip and reopen Noise Reduction.
Hit ok

Silence
Select a chunk you want to zero out and go to:
Generate / Silence

Effect / Fade in and out are pretty intuitive.

Radio Effect
Create the Effect first:
File / Chains / Edit Chains
Add "Radio Noise"
Insert
Equalization - Edit Parameters
Select Curve: Telephone
ok , ok

Apply the Effect:
Make sure nothing is selected or that just the part you want the effect on is selected.
File / Apply Chain / Radio Noise
"Apply to Current Project"

F1 default selection tool
F2 Envelope tool

If you have volume spikes and dips or even a loud screen you want to quiet a bit in your clip you can edit it with the Envelope Tool.
Make sure your clip is cut to the correct duration before doing this or you will have to re do it.
Hit F2 or click the icon that looks like an hourglass with a curve going through it.
Use the splines to correct your volume issues.

Save out the clip as a .WAV file.

Converting an existing file to the correct settings can also be done in Audacity but it can distort the clip.
I recommend just playing the clip through VLC and recording it as a new clip in Audacity.

---

File Naming and Organizing

It is recommended on the Steam forums that you focus on these category of Lines.
But it isn't super helpful since in the editor you can edit any line from a soldier and it is overly broken down for what line for what situation. This sound clip list is a good start but is really lacking. I'll try to update this list here to make it a bit more practical.

    Acknowledged (Can bbe used for Moving/ Dashing as well)
    CivResc
    Dead (Death Scream... only need one)
    Evac
    FriendlyDead
    Miss
    Graze
    Grenade
    Hacking (All types are broken out)
    Hit (Hit not Kill)
    Hit Armor
    Kill
    Loot
    Medikit (Healing is broken down for many situations)
    Moving
    Dashing
    Out of Ammo
    Overwatch
    Hunker Down
    Panic (Many different reactions to Fire)
    Patrol
    Psionics (Goes down to each move type)
    Reloading
    Sighted (Sighted for each enemy and friendly and package type)
    UnderFire (Panic can be used here too)
    Wounded
    
> Reminder: A detailed list is in the Editor "Voice Bank" for each voice action.

---
The "XCOM 2 War of the Chosen Development Tools" contains "Mod Buddy" and the "UDK Xcom 2 Editor"

First Time setup


Go to Tools / Options / XCOM 2

    XCOM 2 Install Path – Program Files (x86)\Steam\steamapps\common\XCOM 2\XComGame\
    XCOM 2 User Path – Program Files (x86)\Steam\steamapps\common\XCOM 2 War of the Chosen SDK\XComGame\

Then go to Tools / Options / Projects and Solutions

 Projects Location:

Change "***********" to your user file name.    

    C:\Users\***********\Documents\Firaxis ModBuddy\XCOM

Project Templates Location:

    
    C:\Users\***********\Documents\Visual Studio 2013\Templates\ProjectTemplates

Item Templates Location:


    C:\Users\***********\Documents\Visual Studio 2013\Templates\ItemTemplates

Then go to Tools / Options / Projects and Solutions / Build and RunChange the two verbosity dropdowns at the bottom of the options panel to “Normal”, then hit OK.

---

New Project

I am going to use the naming format of my Lirik Voice Pack Mod as examples. 

Select ExampleVoice Pack
Name:

~~~
LirikVoicePackMod
~~~

Check the location for the file, it likes to use OneDrive so make sure you direct it to where you really want it.
ok

---

The Mod Preview image is located in the mod's folder here for me:

> C:\Users\***********\Documents\Firaxis ModBuddy\XCOM\LirikVoicePackMod\LirikVoicePackMod

it's 588 x 512.

---
Open the "Content" folder in ModBuddy, select and right click delete the 4 UPK files there.

Tools / XCOM 2 Editor

> "Ignore any warnings here" ~youtube expert

In the Content Browser Window, at the bottom left, hit NEW.

---
Replace MyPackage with: 

~~~
Lirik1Voice_Tutorial
~~~

Name:

~~~
Lirik1Voice_soundcue
~~~

Factory: SoundCue

---
Import all your .WAV files into the Content Browser by just dragging them in.

Location and Naming should be correct so just say "Ok to All"

Now right click / Delete (Force) the SoundCue we created initially. This was made just to create the package. Packages need something in them to exist so we made it so it wouldn't be empty.

**SAVE**
Direct you the "Content" folder of the project and save it the same as the Package name:

C:\Users\***********\Documents\Firaxis ModBuddy\XCOM\LirikVoicePackMod\LirikVoicePackMod\Content
~~~
Lirik1Voice_Tutorial.upk
~~~

    Now it should show up in the "External" folder in the Content Browser as well as New Packages.
    Select the one in the External folder to edit.

!! I repeat, Select the one in the External folder to edit!!


Back to ModBuddy right click the "Content" folder and Add / Existing Item
then navigate and select the .upk file and it will show in Mod Buddy

Back to Unreal

Voice Bank


Go to the Actor Classes Tab and uncheck everything.
Search voicebank
Select "XcomCharacterVoiceBank_X2" Right Click it / Create Archetype...

Project is the same as we first set it, you can find it in the drop down or just type in "Lirik1Voice_Tutorial"

Name it:

~~~
Lirik1VoiceBank0
~~~

Go Back to the Content Browser Tab and open it up to check out all the stuff you can customize.
We need to add our .WAV files to soundcues to add to the sound bank.

Create ScoundCues


Right Click in the Content Browser blank space and hit "New SoundCue"
It is going to select the correct package but set the same to the soundtype_cue
I am not sure if leaving it all lowercase is needed or not. 
~~~
acknowledged_cue
~~~

Select all sound files you want to add to the cue in the content browser, then right click in the soundcue window "Random: Acknowledged_1"
This will add a randomize node infront of all the sounds you are adding.
Connect the random node to the output node.
Set Volume Multiplier at the bottom of the Soundcue window to 1.
Close the Soundcue window.

    In Xcom 2 the preview voice plays the "Dashing" action so for testing you are going to want to apply it to that action.
    
Open your Voice Bank if it isn't already open.
Select your desired Soundcue to add.
Then hit the Green arrow next to the desired action to use it.

To mass edit soundcue volume just select them all in the content browser.
Right Click / Sound Cue Node Properties
From here you can edit the volume multiplier for all sound cues at once.

> Volume of 7 sounds pretty good for the Lirik stuff.

    Select all of your Sound Cues
    Right CLick / Sound Classes: Master -> Voice
    This makes the audio mix into the game correctly

Adding Voice Archetype


Go to the Actor Classes Tab and uncheck everything.
Search xcomcharacter
Select "XcomCharacterVoice" Right Click it / Create Archetype...

Project is the same as we first set it, you can find it in the drop down or just type in "Lirik1Voice_Tutorial"

Name it:
The Name has to be different from the actual .upk file itself. It's case sensitive and you will need this later.
~~~
Lirik1Voice_Arch
~~~

Open the node you just made in the content browser and hit the + sign to the right of Voice Bank.
Select your one voice bank in the content browser and then hit the green arrow to add it to the Voice Archetype.
Close the Window.
SAVE

> You will get a warning about external packages, just hit Yes. ~youtube expert.

Generating Sound Banks


Tools / XCom Utilities / Generate Sound Banks

    Voice: Lirik1Voice_Arch
    Bank Count: 15
    Sound Cue Package: Lirik1Voice_Tutorial
    GO!

Close the Generate Sound Banks Window.

Look in "New Packages" we need to mave all of those packages into our main package.
Select each and every package one by one, right click the Arch in them and "Move" it to the main package and save the file.
Check your Arch file to make sure the are all pointing to the main package.
Now BUILD AGAIN, this time they should update in main.

Configuring the Mod Properties


Back into ModBuddy

Select Config / XComContent.ini
Delete the Second line sine that is for female voices.
Language="english"
TemplateName="LirikVoice1_TUT"

The Archetype Name is going to be our UPK name followed by our Archetype name
ArchetypeName="Lirik1Voice_Tutorial.Lirik1Voice_Arch"
My full line edit:
~~~
+BodyPartTemplateConfig=(PartType="Voice", Language="english", Gender=eGender_Male, TemplateName="LirikVoice1_TUT", ArchetypeName="Lirik1Voice_Tutorial.Lirik1Voice_Arch")
~~~

SAVE

Select Localization / XComGame.int
Delete the bottom two line pertaining to the female voice.
Replace the first part of the 3rd line to your template name and change the display name to what you want to see in game.
My Change:
~~~
[LirikVoice1_TUT X2BodyPartTemplate]
DisplayName="Lirik Voice"
~~~

Right click the top group "LirikVoicePackMod" not the Solution blah blah
and hit properties.

This is what will come up in the Steam Workshop.

    Mod Name: Lirik Voice Pack
    Description: Voice Pack created to add LIRIK to my team to save the world and all the cats in it. You can chatch him at www.twitch.tv/lirik o7 lettuce cat meow we good.

This will be lost every time you make edits so write it down somewhere so you can paste it back in later.
SAVE

Building


Hit Build / Build Solution

That should do it... if it errors out here you prob dont have all the required project files or you miss spelled or messed up it's context sensitive nature.


Debugging


You need to shut down the content browser, you can't start the debugging process with the Content Browser up.

Debug / Start Debugging

If it doesn't work and you get the 

    Application load error V:0000065432
    
Like me you can go to this folder instead:
Program Files (x86)\Steam\steamapps\common\XCOM 2\Binaries\Win64\Launcher
and run the StartDebugging.bat file from here

Testing the Sound Pack

The Fastest way to do it is to go into Character Pool and grab a character. Slap the voice pack on them and smash preview.
Is it throwing an error?, is it super quiet?, is it silent?.
All three are different problems with different solutions.

Problem Solving


    If you want to edit the existing UPK
    Upen up the Xcom 2 Editor and hit the file button in the Content Browser.
    Navigate to the UPK and open it up.

Redscreen errors
There will be a lot of them if you have files sitting in your mod folder that also depend on steam workshop stuff.
You can ignore them for the most part and "Enter" past them.

Throwing Error:
~~~
Couldn't load body part content: LirikVoicePackMod.Lirik1Voice_Arch ! The entry for this archetype needs to be fixed in DefaultContent.ini. @csulzbach
~~~
> I solved this error by fixing my naming in the XComContent.ini I had the wrong name for the UPK listed next to the Arch name. (corrected in doc)
> Most errors come from this line being user error.

Silent voice:
Generating Sound Banks fix

> If you are not getting Errors for your voice pack but can't hear anything try Re-building your sound banks as described earlier.

Super Quiet:

> Just raise the volume on the soundcues
> I hope your over all levels for your sound clips are the same.

ReBuild your solution and Debug again.
    

Friday, March 28, 2014

The Great Pokemon Rom Migration of our time! Gen 1 to Gen 2 to Gen 3 to Gen 4 to Gen 5 to Gen 6 to Gen 7

The Great Pokemon Rom Migration of Our Time! Gen 1 to Gen 2 to Gen 3 to Gen 4 to Gen 5 to Gen 6

When I first made this guide I had been playing loads of Pokemon on emulators with roms and my motivation was Twitch Plays Pokemon and the desire to transfer my Mons from the very first games to the more recent ones. This guide is built on my personal experience with migrating pokemon from game to game. I know this guide will work 100% if you use the games I have and do exactly as I do. I have been updating this guide since March of 2014 and I update it when I find out easier ways to do things and when I know for sure that the method works.

Currently Citra is the only legit emulator for the 3DS.

A little background first… Pokemon Generations and their Games. https://en.wikipedia.org/wiki/Pok%C3%A9mon_(video_game_series)

Gen1:
Red/Blue/Yellow
Gen 2:
Gold/Silver/Crystal
Gen 3:
Ruby/Sapphire/Emerald & Fire Red/Leaf Green
Gen 4:
Pear/Diamond/Platinum & Heart Gold/Soul Silver
Gen 5:
Black/White & Black 2/White 2
Gen 6:
X/Y & Alpha Sapphire/Omega Ruby
Gen 7:
Sun/Moon Ultra Sun/Ultra Moon

FAQ
Where do I find pokemon roms? Just Google it.

Support the series and buy the games. I own a copy of every pokemon game I have played via emulator.


The Great Migration Guide:
If a link is dead for a transfer tool a great place to start searching is the Project Pokemon forums: https://projectpokemon.org/forums/ https://projectpokemon.org/home/forums/topic/39395-pokemon-save-editors-directory/Before making any changes to your pokemon save files aka “battery file” (.sav) make sure you make a backup. I always have a backup file and sometimes backup/ backups when testing tools.

Gen 1 to Gen 2
I played Red/Blue and Crystal with the VBA LINK 172 emulator

Tool Transfer:
PKHeX is a fantastic tool and the Master tool used these days for managing your pokemon Gen 1 to 7.
Emulation Transfer:
Gen 1 to Gen 1 / Gen 1 to Gen 2 / Gen 2 to Gen 1
As Luke Freeman in the comments stated:
TGB Dual can trade between RGBYGSC without any problems, and .sav fiels are completely compatible with VBA Link, which can’t trade between those versions.

So if you wanted to do some trading without using an outside program other than an emulator you can use TGB Dual.

To trade between Gen 2 and Gen 1 you will need to first meet “Bill” in your Gen 2 game and then wait “24 hours” to unlock the interface in the poke-center.
Keep in mind:
TGB Dual was created initially in Japanese. So make sure you look for an English version. I was able to find TGB Dual Vol. 8.3.1 in english.

Thanks Luke!

Possible Legit Transfer:
Gen 1 to Gen 7 and ???
So the E-Shop versions of the Gen 1 and 2 games can transfer up to the PokeBank.

Gen 1 & 2 to Gen 3
Keep in mind:
As you may have heard transferring pokemon from Gen 1 & 2 to the Gen 3 games is impossible. Well that is only half true. When the people at Nintendo made the Gen 3 games they made the IV/EV stuff more complex. These are the hidden values on your pokemon that determines nature and how they will grow stats wise as they level. The “Metropolis” can convert the Gen 1 & 2 pokemon to Gen 3 with this in mind but you must also input the caught location manually and their trainer ID may need a re-roll. PKHeX will allow you to import this converted Gen3 pokemon but you will have to do some editing to make it legit.

So if you want your legit pokemon to ever leave emulators and make it into a legit cartridge you may want to start with Gen 3 instead of 1 &2.

I played Red/Blue/Crystal and Emerald with the VBA LINK 172 emulator

Tool Transfer:
Download: PKX Delta: https://projectpokemon.org/forums/forums/topic/33544-gen-1-2-3-pokemon-editor-and-converter-for-windows-mac-os-x/
PKX Delta will load a .sav file and will allow you to open multiple game .sav files and right click / copy and paste pokemon from Gen 1 & 2 to Gen 3.(mixed results)


If you can't get PKX Delta working go for the Metropolis to PKHeX method.

Keep in mind:
Emerald, by default, will not save out correctly with VisualBoyAdvance or VBA LINK to edit with PKX Delta or A-Save. Also to just play it normally with VBA LINK you need to make some changes to your settings.
Under Options/Emulator check:
Synchronize
Real Time Clock
Save Type>
Automatic
Flash 128K
Image of my settings in VBA:

If you messed up on using the correct save file type you can try converting it here: http://shunyweb.info/convert.php

Gen 3 to Gen 3

Emulation Transfer:
If you want to avoid using an outside emulation program you can trade with yourself using VBA LINK. I have traded successfully with myself with Fire Red and Leaf Green.
Keep in mind:
I have read that a bunch of people are having a hard time getting VBA LINK to work. I think this is a problem with what version of VBA LINK they are using. The version I have been using is 1.7.2.
Tool Transfer:
PKHeX is my preferred method for save editing BUT for Gen 3 there is also this awesome tool:
Trigger's PC is a box management tool for all things Gen 3, you can open multiple saves and once and easily move and trade/evolve without all the fuss. There are loads of great features for any Gen 3 pokemon fan.

Gen 3 to Gen 4 Pal Park Optional


Tool Transfer:
Use PKHeX : https://projectpokemon.org/home/files/file/1-pkhex/ 
Super easy! or... if you want to know what real pain feels like:

Emulation Transfer:
SPOILER
I played Emerald and Platinum with the VBA LINK emulator and the DeSmuMe emulator
Just to be clear:



One does not simply transfer from Gen 3 to Gen 4 via Pal Park
For starters you need to beat your Gen 4 game. All Gyms, Elite 4, and get the National Pokedex for at least Seeing all the pokemon in the game. This means you need to do a lot before Pal Park becomes available.

Ok so… DeSmuMe has a GBA slot for your Gen 3 rom…
  • So there are a lot of issues with getting DeSmuMe to do this correctly.
  • For starters the new version of DeSmuMe 0.9.10 will not work so you need to use the older version: 0.9.7
  • The Gen 3 .sav file needs to be saved out as Flash 128 in VBA LINK 1.7.2
  • Export a battery file (.sav) from VBA LINK 1.7.2
  • Ok using the correct programs and settings…
  • You can’t transfer pokemon that know HM moves so delete the moves.
  • In Emerald the move deleter is in Lilycove City, east of the PokeMart.
  • You can only transfer 6 pokemon a day to pal park so changing your computer time/day is a must.
  • You can’t transfer pokemon that are currently in your party in Gen 3 so get them in the boxes.
  • Process for Transfer:
  • Place the gen3.gba and gen3.sav file in the roms folder of the Old DeSmuMe from VBA LINK 1.7.2
  • (*_*) Open Old DeSmuMe and open your Gen 4 game.
  • In the menu go to Emulation -> GBA slot
  • Change it to Guitar Grip, this will reset the game
  • Now change it to GBA game and select your gen3.gba in the Old DeSmuMe roms folder.
  • This will reset the game again.
  • If everything was done correctly you will now be able to migrate 6 pokemon over via the main menu
  • Good ol’ “Save Failed” can still happen for what seems like no reason. Anyways No worries! Just ReSave and export from VBA LINK and try, try again.
    Check your versions and make sure you are exporting your save correctly.
  • Pal park is stupid easy. Just walk around till your pokemon spawns, might need to surf, and throw a ball.
  • Transfer new pokemons to box via guy working there.
  • Save game and close DeSmuMe
  • Change your data to the following day on your computer and repeat the process starting at (*_*)
  • Good ol’ “Save Failed” can still happen for what seems like no reason. Anyways No worries! Just ReSave and export from VBA LINK and try, try again.
  • Once you have a stable save for Gen 4 transfer with it stays stable.
Keep in mind:
When Save Failed happens the game will tell you upon opening next time that the save was corrupted and that it reverted to an earlier version. No worries! It just recognized that the save failed and it’s cool.
SPOILS




PKHeX is really the way to go these day! Even if you want to bring rom pokemon to a legit 3ds title.
Scythe Ironclaw gives a clear tutorial on on how to achieve this.^

Gen 4 to 4, Gen 4 to 5, Gen 5 to 5
This guide got a lot easier when PKHeX got a lot better. Thank you PKHeX <3
Gen 5 to 6
PKHeX works just like PokeGen and can even use .pkm files from PokeGen.


Currently for most people:
You can move your pokemon to a DS flashcart and then move it to another Gen 5 game. Then using a DS and a 3DS to the PokeBank using the Pokemon Transfer tool on the 3DS. You do risk losing your pokemon if it is caught by a filter to weed out hacked pokemon from a tool like PokeGen. If you pay for the PokeBank it is an easy way to manage your pokemon for any legit copy of Gen 5 / 6 / 7 pokemon.

Hardware Trade Up
If you are interested in semi legit transfer of non-emulated pokemon from Gen 1 to Gen 6 / 7 beyond check out this video by Linkara-AtopTheFourthWall https://youtu.be/bc_Jovck1so
Keep in mind:
Some of the save editing tools in the video are out of date and have been replaced by PKX Delta and PKHeX.