I removed the old tutorial since it was for earlier versions of the UDK and nFringe and seemed to be causing confusion. Hopefully that link will stay current for new versions of nFringe and UDK since I haven't been keeping up to date with it lately.
Cool, that UDN document was exactly the type of information I was looking for a few days ago. I couldn't find very much so I just tried to figure it out using what I could find and lots of trial and error. Please, feel free to add anything I wrote here to that UDN doc to make it more complete.
Also, if visual studio won't create a project make sure the folder you are trying to create the project in does NOT already exist.
Why Visual Studio?
Using Visual Studio with nFringe makes coding unrealscript much easier, mostly because of getting a "Go to definition" link by right clicking in the code, syntax highlighting, and intellisense which shows what functions can be called from various objects.
This will explain how I got it working because it wasn't very straight forward, at least not to me.
To begin, this tutorial will assume you have already installed Visual Studio 2008 (this should work in the free Express edition but I have not tried it). You also need to have installed nFringe by following the instructions. Obviously, you need to have installed UDK as well and make sure you run the UDK game demo at least once before following this tutorial so the config files get generated.
Create a new project of type "UnrealScript" and select "UnrealEngine 3 Licensee Project"
Name: enter "SuperFunProject" or whatever you would like the package to be called.
Location: pick C:\UDK\UDK-2009-11\Development\Src
Uncheck "Create Directory for solution"
On the solution drop down leave it on "Create new Solution"
Finally, click OK to create the project
2. Configure the project
Right click on the project in the Solution Explorer and click Properties
Under General -> Game -> Target Game pick “UnrealEngine 3 Mod” from the drop down menu (this is needed because you can’t set the “Reference Source Path” when using the “UnrealEngine 3 Licensee Project” type.
Under General -> Script Compiler -> UCC Path pick: C:\UDK\UDK-2009-11\Binaries\Win32\UDK.exe
Under General -> Script Compiler -> Reference Source Path pick: C:\UDK\UDK-2009-11\Development\Src
Under Build -> Script Outputs check “Manual set UCC output directory” and set the path to C:\UDK\UDK-2009-11\UTGame\Script
Under Debug -> Start Action -> Start Game Executable set the path to C:\UDK\UDK-2009-11\Binaries\Win32\UDK.exe
Check “Enable unpublished mods”
With the project selected in Solution Explorer, right click, and select Add -> New Folder. Type “Classes” and hit enter. Now any new classes you make should be added under the Classes folder. To follow this tutorial, add "SuperFunGame.uc" which you downloaded above. Right click on "Classes" and select "Add existing item" (make sure you copied it to your Classes folder first in Explorer) then select "SuperFunGame.uc"
Finally, close the solution (MUST exit Visual Studio) and then reopen it. This adds all the Reference Source files which is the UDK source code. It also allows Intellisense to work correctly.
3. Build the project
Add an existing file (as a link) to your project from C:\UDK\UDK-2009-11\UTGame\Config\UTEngine.ini. Click the arrow to the right of Add and select "Add as a link". This way it won't copy the file to your project directory.
Edit the file and search for “ModEditPackages=” and make sure your mod name package is included there. Add a line: "ModEditPackages=SuperFunGame" if you are following this tutorial (now save and close UTEngine.ini).
Make sure the Output window is open in Visual Studio. Now you should be able to build using Visual Studio (press F6) or pick Build -> Build Solution from the menu. You will probably get an error about not being able to find the .NET Framework SDK but you can just ignore it.
Check your C:\UDK\UDK-2009-11\UTGame\Script folder for the output of the .u file for the package you just compiled. In this case, there should be a SuperFunGame.u file at that location.
Finally, if you see the .u file in there for the package you just build, then you are ready to test it out.
4. Run the project
Under the project properties -> Debug -> Start Action, check “Load map at startup” and type "dm-deck" or whatever map is available
Check “Start with specified game type” and type the "ModPackage.Class" such as "SuperFunGame.SuperFunGame"
Check “Enable unpublished mods”
Check “Open log window at position” and position it wherever
Run your project by pressing F5 inside Visual Studio
Visual Studio will pop up an information bubble saying that pixel mine doesn’t allow the free non-commercial nFringe to attach to UE3. But it can still be used to run the code and/or look at the log console or output.
There are corrections on this.
The quickest way to get this right is instead of naming your project as SuperFunProject as indicated in step 1, name it SuperFunGame. Otherwise, you have to do these corrections:
Step 3.2: ModEditPackages=SuperFunGame should be ModEditPackages=SuperFunProject
Step 4.2: SuperFunGame.SuperFunGame should be SuperFunProject.SuperFunGame
Well I have VS2008 and nFringe setup and my project is compiling fine, so many thanks for this thread!
My question is... Is there anyway of working on scripts within VS2008 at the same time as working in UDK?
I mean, when I compile the solution within VS2008 I get a build error when the core compiles as the UDK is open. When coding I do tend to build and test constantly which means closing and opening UDK every few minutes.
Maybe I've missed something obvious or am a total noon!