A Part of Chkdraft: If whatever you're creating has very little abstraction from blizzards map format and is justifiably useful to everyone that might use Chkdraft, pitch it to me, gather a bit of what others think about it, if it seems to fit or has a lot of demand we can work together to get it integrated, the source is included with every official release of Chkdraft so you can look at doing the code yourself if I approve and don't show high enough interest to do it straight away (please track your changes if this is the case).
Advantages: Can use all of Chkdraft's code, no hassle for users, easier distribution of your feature
Disadvantages: Need to get my approval, your code may be altered from time to time
A Standalone Program: If you want to read a map or make some one-time changes a standalone program's the right way to go.
What's provided: Code for opening and saving, almost all code used by Chkdraft to read and make changes to the map
Advantages: Easier and quicker to code than plugins (starts the same way)
Disadvantages: Map may be saved over by this or another program, you're in charge of distribution
A Plugin: If you're making something that would be most useful modifying open maps, this is the right path, it's a little more difficult to get started then a standalone program.
What's provided: Everything you have with standalone programs plus... messages for saving the map, importing and exporting scenario files from/to Chkdraft, and sending new triggers in text or raw TRIG section form
Advantages: Can work near-seamlessly with open maps, instant synchronization
Disadvantages: More difficult to code than standalone programs, you're in charge of distribution
Getting Started:
For starting either a standalone program or plugin, if you do not plan to import/export whole scenarios in a plugin, skip to 9-12
1. Obtain a compiler, ideally Visual Studios 2012
2. Create a new project for your plugin/program
3. Download the latest copy of Chkdraft
4. Browse to //Chkdraft/src/Chkdraft/Source Files/ and copy the entire Mapping Core folder to your projects code folder
5. Include SFmpq_MT.lib for your release configuration and SFmpq_MTd.lib for your debug configuration
- In VS2012 go to project->properties, select your configuration in the top left box, select linker->input and in addition dependencies put "Mapping Core/SFmpq_MT.lib;" and "Mapping Core/SFmpq_MTd.lib;" for release and debug configurations respectively.
6. In project->properties, under C/C++ All Options, change runtime library to /MT (for release configuration) and /MTd (for debug configuration)
7. Include all the .h and .cpp files from mapping core in your project, preferably under their own filters
8. Put #include "Mapping Core/MappingCore.h" at the top of your main and any other project files that need it
Plugin only steps:
9. Copy ChkdPlugins.h from Chkdraft to your project code folder, include it in your project and #include "ChkdPlugins.h" in any files necessary
10. If your project doesn't have a window, setup a message-only window for communicating with Chkdraft (see example programs if necessary)
11. Get a handle to Chkdraft ( HWND hChkdraft = FindWindow("MainChkdraftWin", NULL); )
12. Send messages as ChkdPlugins.h specifies to communicate with Chkdraft
Examples:
Plugins:
http://www.staredit.net/files/2962/
ATextTrigGenerator (link pending)
Standalone Programs:
http://www.staredit.net/files/2901/
TerrainScale (link pending)
TrigAnalysis (link pending)
TrigCount (link pending)
Post has been edited 5 time(s), last time on Jun 6 2014, 12:03 am by jjf28.
TheNitesWhoSay - Clan Aura - github
Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.