Giter Site home page Giter Site logo

forcecraft's Introduction

Forcecraft

This Minecraft mod visualizes Salesforce Accounts, Opportunities and Contacts. Forcecraft adds a new dimension to Minecraft, where each Account in your Salesforce environment (aka 'org') is represented by a building, comprising a level for each Opportunity associated with that Account.

Forcecraft

Levers on each level represent and control the Opportunity Stage Name; updating an Opportunity's Stage Name outside Minecraft will cause the lever state to update within the Minecraft world, while throwing the lever in Minecraft will update the Opportunity's Stage Name.

Opportunity Levers

Each Salesforce Contact is represented by a Villager-derived entity, with the Contact name shown as a custom name tag above the entity's head.

Contact

Interacting with a Contact (right-click, by default) will show the Chatter feed for that Contact and allow you to post to the feed. Similarly, Account and Opportunity signs give access to the respective Chatter feeds.

Contact Feed

If an Opportunity's Stage Name is updated to 'Closed Won', a Contact from the associated Account will teleport to the player and give the player items to the 'value' of the opportunity. If, on the other hand, an Opportunity's Stage Name is updated to 'Closed Lost', the weather will take a turn for the worse!

Take a look at the mod in action:

YouTube video

UPDATE (version 0.2.1) : if you define a custom object, Vegetable, in your Salesforce environment, the corresponding item will appear in the game when a record is created. The Vegetable object must include the following fields:

  • A picklist field named Type with values Flower, Carrot and Potato
  • A number field named Quantity

If the Vegetable object exists, Forcecraft will automatically listen for updates.

Running the mod

Pre-requisites

  • Minecraft 1.7.2. Download the Minecraft Launcher, edit your profile, and select version 1.7.2.
  • Minecraft Forge - I've been using 10.12.1.1060 - later versions may also work. Download the Forge Installer and run it (select 'Install Client') to create a Forge profile in the Minecraft launcher. Select the Forge profile.
  • The mod binary - Download it and drop it into the Minecraft mods directory. On a Mac, this is ~/Library/Application Support/minecraft/mods; on Windows it is %appdata%/.minecraft/mods.
  • A Salesforce org. Create a free Force.com Developer Edition if you are new to Salesforce and want to try out Forcecraft.

IMPORTANT You MUST create a configuration file with your account credentials so that Forcecraft can authenticate to Salesforce. Use this as a template:

# Configuration file

####################
# general
####################

general {
    I:dimensionId=7
    S:loginHost=login.salesforce.com
    S:[email protected]    
    S:password=p455w0rd
}

Edit this, and save it as

  • Mac: ~/Library/Application Support/minecraft/config/Forcecraft.cfg
  • Windows: %appdata%/.minecraft/config/Forcecraft.cfg

You MUST edit the username and password entries. If you are using a Salesforce sandbox, change the loginHost to test.salesforce.com.

Run Minecraft and select the Forge profile. If all is well, you should see Forcecraft listed on the Mods screen. Start Minecraft as a single player and create a new world, in creative mode.

Create New World

Once the game starts, you can type /login to teleport to the Forcecraft dimension. Type /logout to return to the default 'Overworld' dimension.

Note - if you're demoing the mod, you probably want to stop the game from pausing when you switch away to the browser or another app. To do this, edit options.txt

  • If you're running via Eclipse (see below), it's at <forge dir>/eclipse/options.txt
  • If you're running 'standalone' on a Mac, it's at ~/Library/Application Support/minecraft/options.txt. On Windows, it's at %appdata%\.minecraft.

Look for the line that reads

pauseOnLostFocus:true

Change true to false.

Building the mod

Pre-requisites

Minecraft, etc, as listed above, under 'Running the mod'. You will need the Minecraft Forge 10.12.1.1060 source distribution. Follow the installation process.

Getting the source

Fetch the Forcecraft repo into the Forge root directory (the forge/ directory created during zip extraction) like this:

cd forge
git init
git remote add origin https://github.com/metadaddy/Forcecraft.git
git fetch
rm build.gradle src/main/resources/mcmod.info
git checkout -t origin/master

Building the mod

gradle build

The build process creates build/distributions/Forcecraft-1.7.2-0.2.3-mod.jar. This is an uber-jar including all the mod's dependencies, packaged so that Forge will load it correctly.

You should be able to drop this into the mods directory to play the mod with Minecraft + Forge.

Debugging the mod

Create the Eclipse project:

gradle eclipse

Build the mod jar (see above). In the Eclipse Project Explorer, open the build/libs folder, select Forcecraft-1.7.2-0.2.2-dep.jar, right click, and select 'Build Path | Add to Build Path'. This jar file contains all the dependencies that Eclipse needs.

Follow the instructions in the 'Running the mod' section above to configure the mod, except that the configuration file needs to be at /<forge dir>/eclipse/config/Forcecraft.cfg.

In Eclipse, you can use the 'Run' or 'Debug' button as appropriate.

forcecraft's People

Contributors

metadaddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forcecraft's Issues

Configuration question

This is probably pilot error, but tonight I spent some time trying to get this running and I got pretty close. I used the instructions on the repo, and when using Forge 1.7.2, I kept getting an error when I'd attempt to launch using the Forge profile:

java.io.IOException: Error=13 Permission Denied

I figured I could change this by changing the profile to downgrade and look at a 1.7 JRE, but that didn't seem to work for me (I tried to make my JRE directory accessible, but I'm not sure I succeeded)

Being oh-so-clever, I tried upgrading to Forge 1.7.10. That worked great-- I got past the Permission Denied error-- the mod installed, all looked good, but when I went to launch my cool new world, it crashed with an error:

no opengl context found in the current thread

So, while I didn't expect that to work because 1.7.10 is not supported, I figured I'd ask to see what my best course of action is here-- do I need to downgrade my JRE more aggressively, or am I doing something obviously wrong when I'm configuring?

Thanks!

Have redstone light give cue to opportunity state

Each lever representing the states in an opportunity should connect to a redstone block - this way more complete opportunities would give more light, and by having it always be night, you can see how far along opportunities are by the glow from each floor of a building. (from John Tobin)

Stop contacts/villagers from wandering

A slightly different architecture (such as ladders or gated rooms, iron doors, etc.) would be a way to keep villagers (contacts) in the account or opportunity that they were relevant to instead of wandering off. (from John Tobin)

Single player mode no longer works

Run single player world - no connection to Salesforce, so can't retrieve accounts for new world, can't get Chatter data etc for existing world.

Handle inability to login to Salesforce more cleanly

Currently, we just log the error and carry on, even though nothing will work. For example,

2014-04-21 22:49:32 [INFO] [STDOUT] Logging in to login.salesforce.com as [email protected]
2014-04-21 22:49:32 [INFO] [STDOUT] executing POST https://login.salesforce.com/services/oauth2/token
2014-04-21 22:49:33 [INFO] [STDOUT] ----------------------------------------
2014-04-21 22:49:33 [INFO] [STDOUT] error: invalid_grant
2014-04-21 22:49:33 [INFO] [STDOUT] error_description: authentication failure - Failed: API security token required
2014-04-21 22:49:33 [INFO] [STDOUT] ----------------------------------------

We should somehow show the error more visibly, then fail sooner.

Fireworks!

Winning an opportunity could set off fireworks from the top of the building. (from John Tobin)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.