Page 1 of 1

Modding FAQ (Where to get the source!)

Posted: December 8th, 2011, 11:31 am
by fragmer
Where can I get fCraft's source code?
fCraft's source code repository is located at http://svn.fcraft.net:8080/svn/fcraft/. You can access it by a shortcut url: svn.fcraft.net. To download a snapshot of fCraft's source code, you can either use an SVN client (like TortoiseSVN), or use "Download Tarball" feature at websvn.fcraft.net.

What are the different build configurations?
  • Release (recommended, default): For normal use. Produces the most optimized copy of fCraft, and intercepts any unhandled exceptions.
  • Debug: For debugging. Disables some optimizations. Runs additional self-tests. Does not catch unhandled exceptions (crashes).
  • Debug_Events: For debugging events. Just like Debug, plus every raised event is logged.
  • Debug_IRC: For debugging IRC bot. Just like Debug, plus all IRC input and output is logged.
  • Debug_Scheduler: For debugging the built-in task scheduler. Just like Debug, plus all Scheduler activity is logged, and /TaskDebug command is enabled.
How do I build/compile a copy of fCraft? Where are the binaries?
Binaries are not included on SVN, you will need to build it. To build a copy of fCraft, you will need Microsoft VisualC# 2010 Express (free), Microsoft Visual Studio 2010, or MonoDevelop (free, unsupported). Make sure to select the correct build configuration before building. Binaries will be copied to the /bin/ folder in the branch directory.

What are the different "branches" on SVN?
Each branch contains a different snapshot of fCraft's code. Branches are:
  • /tags/ - Code snapshots corresponding to stable fCraft releases. This is the version that you should use for any mods.
  • /branch-0.10x/ - First ever version of fCraft. Does not work. Not updated.
  • /branch-0.33x/ - Oldest version of fCraft that still works. Last version without multiworld. No longer updated.
  • /branch-0.53x/ - Previous version of fCraft. No longer updated.
  • /branch-0.60x/ - Current version of fCraft (trunk). Frequently updated. May contain unstable code.
  • /branch-0.64x-abandoned/ - Abandoned experimental branch. Contains some unstable/untested code.
  • /branch-0.70x-abandoned/ - Abandoned experimental branch. Thoroughly unstable.
  • /branch-0.90x/ - Future version of fCraft. Under heavy development.
Where's the documentation?
See fCraft.net/api for an API reference. If you are referencing fCraft.dll from your project, make sure to include fCraft.XML file, which will allow VisualStudio to show inline help. For a general overview of fCraft structure, see Architecture article on the fCraft Wiki. For specific examples, see Mod Examples article.

I am using fCraft.dll. How do I get Intellisense to work with it in VisualStudio?
When you build fCraft.dll from source, an XML documentation file will be generated (fCraft.XML). Copy that file together with fCraft.dll into your project folder to get Intellisense working.

Will a plugin system be added to fCraft?
Yes. A system of binary plugins is planned for fCraft. You will be able to create redistributable plugins (as .dll files) in any .NET language: C#, VisualBasic, IronPython, etc. This feature is scheduled for next major release (0.900).

Will scripting be added to fCraft (e.g. Lua scripts)?
No.

I don't know anything about programming. Can I still mod fCraft?
No.

Re: Modding FAQ (Where to get the source!)

Posted: December 14th, 2011, 1:17 am
by boblol0909
Just thought I'd throw this in the sticky
fragmer wrote:Please disable crash reporting if you modify your copy of fCraft.

I have to keep pruning my crash report database to delete crashes caused by custom code. Wastes a lot of my time.

Re: Modding FAQ (Where to get the source!)

Posted: December 30th, 2011, 4:08 am
by fragmer
I am making an effort to fully document fCraft's whole public API. It will be available in XML format (drop into same folder as fCraft.dll to load into Intellisense), and as a web-based reference.

A test of the web-based reference for fCraft 0.642 can be found at www.fCraft.net/api/0.642

I know that there are many comments missing. fCraft core contains over 3000 total public members, of which about half is currently documented. I will be spending many hours commenting everything for the upcoming 0.640 release, with the goal of 100% coverage. My friend Zaneo has also volunteered to help with commenting - much thanks!

Re: Modding FAQ (Where to get the source!)

Posted: September 18th, 2012, 3:17 am
by OfficerFlake
Gday folks.

Microsoft don't link to the 2008 C# studio express anymore, so here it is: http://www.microsoft.com/en-us/download ... x?id=14597

also, I tried opening the SLN with 2010, and it needs converting and doesn't work for me, saying that folders aren't supported (and tools are thus unavailable) is this normal?