Staredit Network > Forums > SC1 Mapping Tools > Topic: Chkdraft Project
Chkdraft Project
Oct 9 2012, 12:42 am
By: jjf28
Pages: < 1 « 6 7 8 9 1015 >
 

Apr 23 2014, 6:23 am jjf28 Post #141

Cartography Artisan

Quote
+ Project settings -> C/C++ -> Code generation -> Runtime library -> Configuration 'Release' -> Change /MD to /MT.

it's been compiled as /MT for a while

Quote
Map <-> Text converter. Enables batch editing of everything in map.

Planning on it :)



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Apr 23 2014, 7:27 am O)FaRTy1billion[MM] Post #142

👻 👾 👽 💪

Quote from trgk
Wishlist:
- Preview minimaps in windows explorer. (Icon handler?)
There was a thing like that some time ago... I don't know whatever happened to it though.

EDIT:
Is the trigger window supposed to look like this? xD

I got parts of it visible at all by ctrl+a and then clicking all the menu options. Moving the resets it.

EDIT:
Quote
'Custom' condition and 'Custom' action are new, 'Custom' condition's format is: "Custom(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)", where arg1-9 are the fields as shown HERE, same deal for action's format ("Custom(arg1, ... , arg11)"); in addition to accepting raw numbers, the custom condition/action also accept any form of text that would be stored in that field (ex: you could put 'Terran Marine' in the unitID field).
I'm wondering about this ... If I put in a custom trigger, with CHKTrig remember it? And if so, how?

Post has been edited 2 time(s), last time on Apr 26 2014, 9:05 pm by FaRTy1billion.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

May 12 2014, 6:52 am CecilSunkure Post #143



I had a short conversation with jjf about making a small extension to Chkdraft. I wanted to make some sort of trigger creator, as I do remember how terribly slow creating triggers through a GUI is. I have a little bit of experience with the Lua programming language, and I was lucky enough to have Kaias create OreoTriggers to give me some ideas. Building off of the idea of OreoTriggers I decided to make a similar utility to be used with Chkdraft.

The idea is to give Chkdraft the name of a text file with Lua code inside. Chkdraft will then use a tool called Lua Interpreted Triggers (LIT) to generate triggers and place them directly into your map. This would happen inside Chkdraft itself, and perhaps require little more than clicking a button. LIT as a proof of concept is already finished. The proof of concept only took 2.5 hours to complete in total, so I imagine completing a fully featured and tested LIT will be a pretty small project! This means LIT will be easily completed and supported by myself.

OreoTriggers, although good looking, does run from PHP which requires server stuff to be set up. I recall in the past this was too difficult for me to figure out. MacroTriggers by Wormer looks pretty similar to LIT as well, but was much too complex to install and use properly. I aim for LIT to be simpler to use and setup than the aforementioned trigger creators, and have integration with Chkdraft directly.

LIT runs code from top to bottom, so control over the order of all triggers can be explicit. Example LIT file (here's a link with syntax highlighting):
LIT code


I ran this file and generated:
Trigger Code


One of the biggest problems with a GUI for trigger creation, besides the annoying clicking, is the inability to use a tree hierarchy for organization. Although this tree feature will likely be created by jjf himself, there's also going to be a great feature for writing LIT code called include. LIT lets you include another file into the middle of any other file. This will let LIT copy/paste entire files around. This lets you organize LIT files in whatever manner you wish, and is exactly the same as the #include directive from C and C++. The file system on modern operating systems is actually organized through a tree itself :). Here's an example:

Code
(in main.lua)
p1 = players( 1 )

p1:conditions( )
always( )
p1:actions( )
text( "print this" )

include( "otherFile.lua" )

(in otherFile.lua)
p1:conditions( )
always( )
p1:actions( )
text( "print a different thing here" )


The entire final LIT file, after the include operation is performed, looks like:

Code
(in main.lua)
p1 = players( 1 )

p1:conditions( )
always( )
p1:actions( )
text( "print this" )

p1:conditions( )
always( )
p1:actions( )
text( "print a different thing here" )


Binary Countoff LIT Example


Binary Countoff Triggers


Anyways, I'm excited for Chkdraft to continue finishing up, and I believe the trigger format is identical to SCMDraft 2, so LIT will be able to be used to generate text files directly, which allows users to use LIT with SCMDraft 2 if they so wish. In the future I'll be posting some more about this to try to coax people into trying it all out to provide feedback. Currently I'll be just finishing up all of the different conditions/actions, and I think it would be cool to try to create a fancy syntax highlighter/auto complete thing for Notepad++.

If you already have suggestions please do post them up in this thread. If you can convince me that your suggestion is a good one I'll implement it. Here's a list of suggestions that I will complete with the names of who suggested them:
  • LoveLess - Preserve trigger goes in all triggers by default. The user specifies a "nopreserve( )" line manually.
  • LoveLess - dcauto( ) will create a death counter and pick a useless unit type. Each subsequent use of dcauto would pick a different player number until all useless units and player numbers are exhausted, and an error message will be produced.
  • LoveLess - Create a function called hypertrigger( ) that people can use so they don't have to write their own loops!


Post has been edited 10 time(s), last time on May 21 2014, 8:26 am by CecilSunkure.



None.

May 12 2014, 9:31 am Wormer Post #144



Oh, CecilSunkure! Thanks for mentioning poor MacroTriggers. Altough honestly I'm shooting the cat when I hear Notepad++. Anyways, this everything sounds very exiting. I wish you good luck with this. The only thing I wish was implemented in the editor is an ability to store your text triggers (with precious comments and definitions) along with the map in an MPQ archive. :flowers:



Some.

May 12 2014, 3:07 pm Sand Wraith Post #145

she/her

Quote from Wormer
Oh, CecilSunkure! Thanks for mentioning poor MacroTriggers. Altough honestly I'm shooting the cat when I hear Notepad++. Anyways, this everything sounds very exiting. I wish you good luck with this. The only thing I wish was implemented in the editor is an ability to store your text triggers (with precious comments and definitions) along with the map in an MPQ archive. :flowers:

Could you simply include the plain-text files with the *.SCM/SCX? That may be worth investigating.




May 12 2014, 3:42 pm CecilSunkure Post #146



Quote from Sand Wraith
Quote from Wormer
Oh, CecilSunkure! Thanks for mentioning poor MacroTriggers. Altough honestly I'm shooting the cat when I hear Notepad++. Anyways, this everything sounds very exiting. I wish you good luck with this. The only thing I wish was implemented in the editor is an ability to store your text triggers (with precious comments and definitions) along with the map in an MPQ archive. :flowers:

Could you simply include the plain-text files with the *.SCM/SCX? That may be worth investigating.
Yeah this is a good idea, not sure if possible so we'll have to wait and see what jjf thinks.

Post has been edited 1 time(s), last time on May 12 2014, 4:26 pm by CecilSunkure.



None.

May 14 2014, 2:27 am Sand Wraith Post #147

she/her

IIRC, *.scm/scx files are basically *.mpq files, so in that respect it should be possible, and ShadowFlare's sight provides libraries for *.mpq manipulation.

I saw in the shoutbox that denoting units as burrowed was important. I would like to add that if the burrow indicator is like that of SCMDraft2 (simply the burrow-hole), it will be difficult to determine what unit types are burrowed. As such, a more useful solution might be highlighting burrowed units with a brown square or something instead of having them displayed in their burrowed animation.




May 14 2014, 3:26 am jjf28 Post #148

Cartography Artisan

yep it would either be added as a section or into the MPQ, currently I would do it as a section since extended strings are also done that way and SCMDraft doesn't seem to mind



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

May 20 2014, 7:16 pm CecilSunkure Post #149



Ended up getting pretty swamped at work last weekend. I'll see if I can finish tonight with a command line interpreter. Check shoutbox later if you're interested in trying it out!



None.

Jun 5 2014, 9:50 pm jjf28 Post #150

Cartography Artisan

Update 6/5/14 - Download Latest

- Map properties page (visual rearrange pending)
- Forces page
- Plugin framework (details)
- Fixed extended unit selection
- Fixed some location undo/redo problems
- Fixed text trigger window display issues

Next up:

- Finalizing unit layer (snap to grid, stacking/non-stacking, burrow graphics, place/non-place anywhere)
- String Editor

Post has been edited 2 time(s), last time on Jun 6 2014, 12:04 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jun 13 2014, 11:18 pm jjf28 Post #151

Cartography Artisan

Small update:

- Asterisk for changes (undoing/redoing stuff toggles it on and off appropriately, like staredit but better since it works across multiple layers :) )
- Unit snap to grid
- Removed a few "unused variable" warnings for plugins/standalone programs



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jul 18 2014, 7:54 pm O)FaRTy1billion[MM] Post #152

👻 👾 👽 💪

A small bug, there's probably more important things though ... When you zoom in/out, moving the screen with the minimap doesn't center the view properly. It centers to where it would be at 100%.

Also get working on this. :P



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Aug 27 2014, 9:24 pm jjf28 Post #153

Cartography Artisan

Update 8/27/14 - Download Latest

- Basic string editor
- Unit non-stack option
- Fixed a bug where "Move-Up" would malfunction
- Classing up GUI code (where most of my time went, see below)

While I was cautious and tested along the way the code overhaul could have created errors, please report any I'd be happy to fix them!




Classing up GUI code:

So I was chugging along building new dialogs for the various map settings and noticed "wouldn't it be nice if the window procs were inside a class, then I wouldn't have ugly globals and disambiguators polluting the proc's"

So I did... then I did it for every type of window I used (Regular, MDI childs, Modeless dialogs, Dialog boxes), then spent alot of time converting windows to these till I got to text trigs, when I noticed "wouldn't it be nice if I have a class wrapping edit controls such that they all automatically select-all" so then I built wrapper classes for almost all the controls I used, and I ended up with a big set of classes that I collectively label Windows UI.

The previously huge Chkdraft.cpp file was converted into multiple files (as were a number of the dialogs) and a Chkdraft class was created that links them all together as well as running the main window. The new Main.cpp file contains one global instance of Chkdraft and calls to run it, all global handles, global window data, and non-const globals in general besides the Chkdraft instance were resorted or removed.

More Details

What this all adds up to is it being much easier to find stuff, error check, create duplicate windows, and generally write more code!




Here's your general introduction to the new Chkdraft code:

You can treat these 3 directories/filters (and the files grouped in them) kind of like libraries:

Common Files - Stuff that every file should have, accelerators for math, defined or linked constants/strings, debugging and some basic structs
Mapping Core - The focus here is editing the data of a map, especially in the Scenario class, can also be used to make plugins/new programs
Windows UI - Encapsulates win32 windows and controls in classes


Mapping:

    Data: The DATA class contains information from StarCraft's files: for graphics, bounds checking, etc.

- The MAPS class contains a bunch of maps (each of which are a "GuiMap")
- A GuiMap is a MDI Child for displaying the map, and contains a bunch of GUI functions, including the Selections, Undo, and Graphics class, A GuiMap also inherits everything from MapFile (everything in the program essentially revolves around this).
---- The following two files are in Mapping Core ----
- A MapFile contains basic map I/O and mpq handling, and inherits everything from Scenario
- A Scenario contains everything you need to edit a scenario file.


Dialog Windows:

These are dialogs, little extra windows, some of the are modeless, others are not, they do things like edit map settings, unit properties, and create new maps, while some may contain others they should all be considered peers (with eachother and the main windows), they all need communication with eachother and can do so through the Chkdraft class, some could use renaming but you should be able to get around easy enough.

Main Windows

These are components of the main window, these are also peers with eachother and the dialogs, their files are easily identified.

The Main Window is made up of a toolbar, a status bar, and the stuff in the middle.
The "Main Plot" is invisible and stretches across all area between the tool and status bars, and contains the "Left bar"
The "Left bar" contains the "Minimap", and the "Main Tree" (unit/loc selection and eventually more)
The "MAPS" window contains GuiMaps, is technically a child of the MainWindow rather than the plot, and is sized against the LeftBar

Post has been edited 9 time(s), last time on Aug 28 2014, 12:19 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Aug 30 2014, 7:35 am Heinermann Post #154

SDE, BWAPI owner, hacker.

Looking better. Look into abstracting the map data into some map class with vectors of units, locations, sprites, etc.

Feel free to borrow stuff from BWAPI (UnitType, TechType, UpgradeType, PlayerType, etc.)

Post has been edited 1 time(s), last time on Aug 30 2014, 7:36 am by Heinermann.




Sep 20 2014, 8:17 am jjf28 Post #155

Cartography Artisan

Update 9/20/14 - Download Latest

Feature changes:
- Main window now uses your OS's default show behavior (or the show behavior from the run call) when opened (will remember previous state eventually)
- Force window now changes force names
- Unit Settings, Upgrade Settings, Tech Settings, and Wav Editor have all the controls (except trees) in place (though they don't do anything just yet)

Bug/Error fixes:
- Fixed a bug where closing all maps would corrupt memory.
- Fixed a bug where astrix wouldn't always show correctly when redoing.
- Fixed a bug where maps sometimes saved raw chk files as .scx
- Fixed an inconsitency where map title/description were not updated when the window was tabbed away from.
- Fixed a bug where string editor color guide was not displaying all the colors

Code changes:
- Gave UNDO class a pointer to the map it belongs to (void pointer, must be cast inside methods), removed all astrix-based messaging and UNDO's instance of mapId.
- Cleaned up alot of Chkdraft and Guimap files code
- File Renaming: Unit->UnitProperties, Location->LocationProperties, Terrain->TerrainPalette, TileProp->TileProperties
- Move the (redicoulously located) tree display names from data class to tree classes
- Moved Mapping Core filter into Mapping filter
- Changed to a 1 IsDialogMessage message loop
- Some buttons are no longer deleted/recreated to remove highlighting

Edit/Hotfix: Fixed a bug where the force check-boxes didn't work.

Post has been edited 1 time(s), last time on Sep 20 2014, 6:32 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Sep 20 2014, 10:22 pm jjf28 Post #156

Cartography Artisan

Update 9/20/14 (afternoon) - Download Latest

Feature Changes:
- Confirm exit dialog for maps with unsaved changes

Bug/Error Fixes:
- Fixed a bug where map settings would not display for a second map
- Fixed a bug where map settings would flag a change where there was none
- Removed delay that would occur with switching from map props/forces tab

Code Changes:
- Scenario::replaceString now returns false if the replacement string is the same as the original

Edit: One more hotfix: toolbar comboboxes now properly hidden on create, as such the player combobox won't bleed through the terrain combobox when you open a map.

Post has been edited 1 time(s), last time on Sep 20 2014, 11:15 pm by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Sep 26 2014, 2:20 pm Freakling Post #157

*sluuuuuuuuuuuuuuuuuurp!* Melee Map Maker

I'd like to make some suggestions of some improvements (on the lates SCMDraft) I'd like to see:

- a faster doodad dialogue (scrollable matrix-like display, basically like the doodad section of the terrain palette), that allows to quicker select from a various doodads without the need to scroll and pick them each separately from the list.

more flexible methods to handle units/sprites, like:
- turning units into unit sprites, and vice versa
- being able to manually edit the unit ID of unit sprites
- option to display collsion boxes for unit sprites
- a generally better to navigate sprite dialogue (with previews, just like for the doodad menu) and making all sprites available (current incarnation of SCMDraft seems to be missing stuff like building rubble/in construction, which earlier version definitely had access to)
- since there are some sprites that crash the game or do not show up ingame, adding some documentation, p.e. mouseover warnings, would be a nice touch
- toggleable display of different layers (so all units/doodads/sprites/terrain tile sprites can be hidden separately, without the need to remove them)

- if doodad and sprite dialogues are improved, likewise could the dialogue for custom brushes (which is now just as un weildy and slow...)

add a simple checkbox option to display different tile/subtile properties, including:
* buildability
* walkability
* terrain level
* cover effect (unit miss chance)
* vision blocking
- adaptable colours/opacity of the overlays, so they can be adapted to individual needs, the terrain type used, allow for making map pictures with them etc.

better fog of war layer:
- add ability to pick© fog of war
- add option to automatically cover all starting locations in FoW, so that a Zerg's initial creep would be completely hidden (additionally to the existing "remove FoW for player" option, obviously)
- maybe even add a more ingame-like display option

this is probably asked too much, but it would safe a lot of work and annoyance if it could be implemented:
- add som sort of unit pathfinding prediction

advanced symmetry option:
- make a symmetry option that mirrors not on the actual centre of the map but on a spot one tile above that (as if a 128x128 map were actually 128x126), which accounts much better for the unusuable bottom row of a map as well as the inherent assymmetry of cliffs

This obviously hinges on isometric terrain support being implemented in the first place... I know there have been some problems with this, but I don't see any good reason why they should not be solvable. The general makeup of the isometrical terrain seems simple enough that it could be just reverse engineered from a map file.

If that's accomplished, I'd suggest to replace the (now so impractical to be used as to be mostly useless) "subtile" dialogue of the terrain palette with an actual "smart edit" function that allows to selectively edit whole terrain "aggregates" (a tile and all its isometrically associated tiles) at once.

Post has been edited 4 time(s), last time on Sep 26 2014, 5:01 pm by Freakling.



None.

Sep 30 2014, 3:23 am jjf28 Post #158

Cartography Artisan

Update 9/29/14 - Download Latest

Feature changes:
- Exiting Chkdraft (the whole program, not just an individual map) now checks for unsaved changes
- Crappy thumbnail for DLDB

Bug/Error fixes:
- Fixed an error where the MDI frame would draw (or undraw, rather) part of the status bar's top frame (looked like part of tree view was there when all maps were closed, ancient error)
- Got rid of the keybeep when working with tree items (ancient error) didn't fully take :(
- Fixed an error where toolbar boxes like layer would receive persistent focus (layover from Classing Up the GUI Code)
- Fixed a bug where cut would not work under most conditions

Code changes:
- Removed all program specific window messages in favor of class functions (yay ClassWindows!)
- Adapted & moved almost all code from GuiAccel into the WindowsUI classes

Post has been edited 1 time(s), last time on Oct 1 2014, 5:04 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Oct 18 2014, 9:47 pm jjf28 Post #159

Cartography Artisan

Update 10/18/14 - Download Latest

Feature changes:
- Unit Settings dialog fully operational

Bug/Error fixes:
- Undos now include unit owner changes

Code changes:
- Moved remainder of GuiAccel code elsewhere
- Removed GuiAccel
- PlayerDropdown class created
- Windows filter Created
- Main Windows Filter emptied into windows filter
- Dialog Windows filter moved into windows filter
- Chkdraft moved into Windows filter
- ChkdPlugins moved into Mapping filter



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Oct 25 2014, 9:51 pm jjf28 Post #160

Cartography Artisan

Update 10/25/14 - Download Latest

Feature changes:
- Upgrade Settings dialog fully operational

Bug/Error fixes:
- Fixed a bug where resetting all unit settings might cause the wrong controls to be disabled later
- Fixed a bug where Display Tile Elevations, 10% zoom, text trigs, and lock anywhere were not grayed when no maps were open.

Code changes:
- (No significant revisions)

Edit/Hotfix: unit & upgrade reset buttons now work properly (section copy was improperly aligned).

Post has been edited 2 time(s), last time on Oct 26 2014, 3:45 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Options
Pages: < 1 « 6 7 8 9 1015 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Roy