Fable: The Lost Chapters Mod Scene
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Fable TLC » Mods » Work In Progress » [WIP] - Fable SDK  () 1 Vote
[WIP] - Fable SDK [message #66480] Fri, 27 April 2012 06:25 Go to previous message
EternalNoob
Messages: 47
Registered: January 2006
Location: The Pit of Hell
Fable SDK

The project has evolved since it's creation from a simple hack, to an SDK for mod development. (This change allows for all the features the original would have granted us, and more.)

Features

The core of this tool is a custom scripting interface using the .Net Framework to power it. (Many games use LUA\Python, etc,. I've chosen .Net because it's powerful, and flexible, for example, while I advocate C#, you could easily use VB.Net to develop plugins, in fact, all .Net languages should be compatible.)

This also gives us access to a powerful IDE, ie, development environment, which features syntax highlighting, intellisense, and a very good compiler, which, of course means, it handles all the parsing, interpreting, etc,. (This stuff is insanely hard to implement yourself, choosing .Net, was wise, it cut months\years off the development of this project.)

Languages, and IDE's aside, I've begun to unlock many features of the game that we've never had access to before, and given you the power to create mods using them.

Game Features

Walk Patch:

This simply overwrites the jogging animation, with the walk animation, allowing you to walk instead of jogging all the time. (This is disabled by default, and can be enabled via an .ini file.)

I've also added the ability to modify your inventory hotkeys(quick keys), this was originally a feature of my Hotkey Trainer, it's now unlocked, and can be used freely in scripts, you can create your own custom hotkey setups, in a variety of ways.

I've also unlocked some player variables for modification:

Health
Max Health
Will
Max Will
Gold
Renown
Morality (Next release.)

I've added an XML Serializer\Deserializer, it can save any formed data to an XML file, in a single line of code, with no real work on your part. (Reading it back in, is just as easy. So, you can save the state of your mod quite easily.)

The included example plugins demonstrate how to query key presses, which could allow for untold amounts of new features to be created.

I've started adding in some hacking tools, basically, they let you access various game systems variables.

Example:

int gold = Hacking.GetInt(Hacking.PTR_CTCHeroStats, 0x3C);


In short, if I can't decode some variable, and some day you do, you can write a function to modify it, and use it in a script.

int PlayerGetGold()
{
    return Hacking.GetInt(Hacking.PTR_CTCHeroStats, 0x3C);
}

void PlayerSetGold(int value)
{
    Hacking.SeInt(Hacking.PTR_CTCHeroStats, 0x3C, value);
}

You could also do this in a property, which should allow for editing similar to what I offer through the SDK.

public int PlayerGold
{
    get { return Hacking.GetInt(Hacking.PTR_CTCHeroStats, 0x3C); }
    set { Hacking.SetInt(Hacking.PTR_CTCHeroStats, 0x3C, value); }
}

Note: This example uses the syntax from the next release, use "GetUInt32" in the current release in place of "GetInt", same for the set command.


Requirements

1. Microsoft Visual C++ Runtimes (MSVC++) 2010
2. Microsoft .Net Framework v4
3. Developers Only: Visual C# (Or, VB.Net, etc,.)

Note: Visual C# will install all the necessary files for you.

Installation

Place all the files\folders(except the examples folder) in the attached .zip file into your Fable install directory.

Usage

After installing the Fable SDK you must launch Fable with the "Injector.exe" in order to use plugins, this will take care of everything else for you.

(The 'scripts' folder has an example plugin in it, and this will affect your game, you can remove\delete the example plugin to remove it's effects, or simply launch the game normally.)

Known Issues

1. Hotkey items are normally only assignable via the games menu system, meaning, you can't assign items you don't possess, this isn't true for my hotkey functions, you can assign any items, at any time, which leads to minor graphical issues when the game tries to display items you couldn't normally have assigned. (I'll create some additional functions to check for the presence of the items, once I decode the inventory data.)

2. The OnCast event fires on things it shouldn't. (Drinking beer, for example.) -Fixed in the next release.

3. A number of player variables were using UInt32, making knowledge of hex necessary to make certain edits. -Fixed in the next release. (I use 'int' now, which anyone can edit, assuming they understand numbers. Razz)

Other Stuff

The included examples should serve as a guide for creating plugins, as well as demonstrating some of the current possibilities. (I'll add more example scripts over time, demonstrating the various capabilities of the SDK.)

You can view the script files in the examples folder with Notepad, the files using the .cs extension, are the script files.

I plan on re-branding everything at some point, this project is based on a generic hacking lib that I've created, thus, it has names like hack.dll, hacknet.dll, Injector.exe, etc,. (I will likely use FableSDK.dll, FableSDKNet.dll, Launcher.exe, etc,. Renaming them yourself is ill advised, ie, don't, it will likely break something.)
  • Attachment: FableSDK.zip
    (Size: 66.30KB, Downloaded 831 times)


Whether you think you can, or can't, you're right.

[Updated on: Sat, 09 June 2012 10:16]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Armour with dynamic capes
Next Topic: Fable: Fallout
Goto Forum:
  


Current Time: Thu Apr 25 06:03:29 PDT 2024

Total time taken to generate the page: 0.01176 seconds