Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: DF RAW editor [w/ syntax highlight, autocomplete, XML-based RAW desc. language]  (Read 20485 times)

Fuco

  • Bay Watcher
    • View Profile

Work on id/ref mapping started. More updates will follow.

EDIT1: The xml parser for ids is done. I had to mess around a bit with the representation, but it's working. The hard part will now be the actual RAW loading and linking... gonna work some magic (with the partialy working DOM this won't be that much of a problem tho.

I should probably start working on some parser api as well.

EDIT2: The output of the modelbuilder:
Spoiler (click to show/hide)

and the testraw.txt
Spoiler (click to show/hide)


What's left is to map ref attributes of token arguments to the apropriate categories (ITEM_ID, ARMOR...). This should be trivial as it only includes a lookup of argument list (to see if there's a subcategory) and one call to map to get the set of values. Those of you who have a desire to help should mobilize and let me know, so I can add you to contribution list on googlecode and to organize the process a bit.

The parser will be available as a stand-alone library with a public API under GPL, for anyone who want to start some other tool, altho I'd like to see all the possible tools integrated into one IDE :)
« Last Edit: August 31, 2010, 02:42:23 pm by Fuco »
Logged

Fuco

  • Bay Watcher
    • View Profile

Adding some eyecandy :)

Linking this to the editor pane will be bit of a challenge. I still haven't figured out how to map text position in pane to the abstract DOM tree you see on the right (so we can get content-sensitive autocomplete and suggestions)

« Last Edit: August 31, 2010, 03:15:48 pm by Fuco »
Logged

MiamiBryce

  • Bay Watcher
    • View Profile

You're doing a kick-ass job here, btw.

I think you're beyond the point of requiring a text pane.  Think about it -  you're organizing the text in the pane indented, not unlike a tree.  Why not just forgo the while idea of having a text pane and instead just have an editable tree control?

Logged

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile

This looks very promising!  8)
Logged

Fuco

  • Bay Watcher
    • View Profile

I think you're beyond the point of requiring a text pane.  Think about it -  you're organizing the text in the pane indented, not unlike a tree.  Why not just forgo the while idea of having a text pane and instead just have an editable tree control?

Well, I still want to have the pane. The tree-structure would have to be controled with mouse, and mouse is quite slow compared to keyboard. It might be easier for starting modders, but for experienced ones, the keyboard input will be much faster.

I'm all for an editable tree by the way, sounds like nice idea. If I find some way to make it effective, I'll try to implement it in some way.


----------
By the way, I figured how to map pane to the tree. Trying to get some demo-app up.
Logged

MiamiBryce

  • Bay Watcher
    • View Profile

Well, I'm thinking if you can TAB, SHIFT+TAB to go from one tree node to the next/previous, it should be able to be done pretty quick.
Logged

Fuco

  • Bay Watcher
    • View Profile

Ok, I was messing for 2 hours with the extended modle builder to count incomplete tokens and comments and arguments and what not, putting it in the right order...

The result is I'm going to rewrite it from scratch tomorrow. :D (as usual)

Well, I'm thinking if you can TAB, SHIFT+TAB to go from one tree node to the next/previous, it should be able to be done pretty quick.
If you think you can implement it efficiently (from the user perspective), try to design a draft or something, with user controls, how he would be able to add, remove, modify nodes etc. I'm not really a mouse-control or fancy structures fan so I can't imagine it working "properly". It might get implemented after the core features are done. The main purpose of the tree now is for me to visually represent the data, so I can find bugs and problems easier.
Logged

Fuco

  • Bay Watcher
    • View Profile

Oh well, the new model builder seem to work. Now for some autocomplete fancy dialog and I'll put up some demo app for you guys.

One result of the added comment system is that the treeview is cluttered with "comment" nodes. Even a "\n" sequence is considered comment, same goes for each whitespace sequence. I'll filter the tree one I figure out how to do it efficiently (TreeModel filter is NOT the way to go). I'll probably just build two models...
Logged

Fuco

  • Bay Watcher
    • View Profile

Stuff works really well, but there's a problem with large files. The swing architecture and some peculiar classes (Document is thread-safe?? WHY) don't like each other, and the UI simply lock up.

Other then that, the context-sensitive AC and HL is finished. When I figure out how to create a proper GUI I'll release some test version... Maybe I'll try out SWT ~_~
Logged

Fuco

  • Bay Watcher
    • View Profile

[NEW_DOWNLOAD_ADDED:DOWNLOAD_NOW!]

Update & new pic in OP as well
Logged

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch

So how long until this evolves into a point and click RAW builder with checkboxes for the tokens and tutorials? Its already an excellent modding tool. Loving the look of the new version.
Logged

Fuco

  • Bay Watcher
    • View Profile

So how long until this evolves into a point and click RAW builder with checkboxes for the tokens and tutorials? Its already an excellent modding tool. Loving the look of the new version.
The point and click checkbox thing isn't exactly what I'm going for, however, that's what Arni was trying to do (I'm not sure if he dicontinued or is just busy right now).

I'm looking more towards the features any decent IDE can provide.

I can code the java part just fine (altho I wouldn't refuse help), the problem is with the RAW database. I am in no position right now to simply write it myself. It'll contain 2000-3000 tokens (the whole RAW language) and span dozens of pages. The main part of the program is already done, aside from some save/load/reload stuff and simple project management (that can be finished within short period of time).

So what I'm saying is
a) you'll have to wait few weeks because I have other things to do (mainly college) and I can't devote a full week to work on the RAWs.
b) someone will help out :O. So far, nobody was interested.
Logged

Arni

  • Bay Watcher
  • Soldier
    • View Profile

So how long until this evolves into a point and click RAW builder with checkboxes for the tokens and tutorials? Its already an excellent modding tool. Loving the look of the new version.
The point and click checkbox thing isn't exactly what I'm going for, however, that's what Arni was trying to do (I'm not sure if he dicontinued or is just busy right now).
Spent all my free time on Mount&Blade:Warband and Shores of Hazeron. :P
But now working on it.
Logged
Military and Militia. It's horrible

Fuco

  • Bay Watcher
    • View Profile

Well, guys... Civ V is out :D This complicates things.
Logged

MaximumZero

  • Bay Watcher
  • Stare into the abyss.
    • View Profile

I'm keeping an eye on this. It looks intriguing.
Logged
  
Holy crap, why did I not start watching One Punch Man earlier? This is the best thing.
probably figured an autobiography wouldn't be interesting
Pages: 1 [2] 3