CAFE

ETW: 자료실

[Tool] DBEditor 1.5.1

작성자PeaceLove|작성시간09.09.25|조회수2,064 목록 댓글 5
 
IMPORTANT UPDATE: version 1.5 had a bug in it that would write the wrong version signature for unit_tables such that after opening a pre-ETW-1.4 unit_tables and saving it in DBE 1.5 would make the file unopenable (end of stream error). There's no easy fix for it except to edit the table manually or go back to the pre-ETW-1.4 pack file and upconvert and save it in DBE 1.5.1. DBE 1.5.1 can't open the bugged unit_tables with the wrong version signature!

I've been working intermittently on this tool for a few months. It is an editor/viewer that takes a relational approach to the db tables that contain most of ETW's game variables. It looks at the ETW data directory, finds all tables in all pack files, and presents them as a bunch of tables like you're used to from the PackFileManager. But DBEditor blows away PFM's editor - it is much more robust, functional, and convenient.

You navigate between tables with the combo box at the top left of the form. Read-only tables are gray while editable tables are black and bold. The aggregate tables are underlined and the file tables are indented underneath the aggregates. What are aggregates and file tables? Read on...

Click for screenshot.
Spoiler Alert, click show to read: 



When ETW starts up, it reads all the db tables and it has to reconcile where two pack files have a db table with the same name, or two different db tables of the same type have rows with the same primary key. I have reproduced this aggregation of the tables in the read-only aggregate view. It shows cells that have been "modified" (one file table's cell overlapping another) in red and you can mouse-over the modified cells to get a tooltip of the original value. The "aggregate table" doesn't actually correspond to any file in a pack, so I call the tables that do correspond to files in a pack "file tables."

Click for screenshot.
Spoiler Alert, click show to read: 



Another very nifty feature is the foreign key combo box. Instead of error-prone free text entry, the combo box lists the valid options for columns which have been determined to be linked to another column (usually in a different table).

For example, every row in "unit_stats_land" must have a unique value for the "Unit" column (this is called the primary key), and furthermore because the "Unit" column is a "foreign key" of "unit_table:ID" each value must first be defined in that table; because unit_stats_land depends on unit_table, it is called a child table and the unit_table is called a parent table.

Click for screenshot.
Spoiler Alert, click show to read: 




Other features:
- support for adding new tables of the current type either to an existing pack file or a new pack file
- support for table renaming and deletion
- robust copy/cut/paste/clone support: entire rows can be copied/cut to the clipboard and then pasted to tables of the same type, or a single cell's value can be copied and pasted into one or more selected target cells
- support for undoing modifications to selected rows
- see modified values in red and new rows in green
- option to automatically make timestamped backups when pack files are saved
- option to make CA pack files read-only (e.g. main.pack, patch.pack, models.pack, etc.)
- option to freeze primary key column(s) so horizontal scrolling preserves context
- somewhat robust handling of tables which CA added new columns to in recent patches
- right-click column header - runtime renaming of columns and saving the new names to the XSD schema
- "Find Relations" - automagical search for relations between columns and saving the new relations to the XSD schema
- "Find" - search all cells for a user-specified substring
- support for picking primary key at runtime (but this should be used pretty rarely)

The program is definitely not free of bugs, but it should be at least as useful as the PFM's db table editor and probably much more useful.

Change log:
Code:
Changes in 1.5:
- updated for patch 1.4 (thanks alpaca)
- fixed DB parser so that future DB.xsd updates won't require code changes

Changes in 1.4:
- partially addressed an exception caused by foreign key columns referring to values absent from the parent table
- fixed handling of format exceptions during paste
- added a "Constrain Referring Columns" option to the View menu so that users can work around errors caused by tables which violate foreign key constraints
- added PackLoadingDialog to allow the user to choose which packs to load (thanks Jinarik)
- added custom implementation of DataGridViewAutoFilter* to fix column sorting (thanks Jinarik)
- added bold font to packs in PackLoadingDialog that are in the currently selected pack file directory(s) (thanks Jinarik)
- added user settings for saving and restoring pack file directories and selected pack files

Changes in 1.3:
- added check for clipboard contents after changing the selected table
- fixed user's ability to add and delete rows on read only tables
- fixed bug where new rows would put empty strings in DBNullable columns instead of DBNull
- switched from enforcing constraints to showing constraint violations as row errors
- improved refreshing of the table/DataGridView after cell edits
- fixed error in DataError handler when the DataRow is in the detached state
- made some small fixes in alpaca's TSV changes which add copy/pasting to/from Excel or OpenOffice Calc:
  * removed broken trimming of whitespace
  * added support for CRLF line endings
  * renewed support for pasting a single value to multiple cells
  * renewed merging of rows with existing primary keys
- turned off constraint enforcement
- improved naming of file table relations
- fixed AddNewTableDialog to select first existing pack (if one or more exists)
- fixed misapplied bitwise logic when checking shortcut keys in CopyPasteDataGridView
- fixed minimum selected row count needed to enable "Cut"
- added taxes_effects_jct to table definitions

Changes in 1.2:
- fixed decimal point separator bug

Changes in 1.1:
- fixed KeyNotFoundException bug when data directory had no mod packs
- fixed AddNewTableDialog to respect the CA-packs-are-read-only option, to create mod packs instead of release packs, and to disallow creating a new pack file with the same name as an existing pack file
- fixed behavior of adding a file table with the same name as an existing table (if the pack file that contains the new table has the same precedence or higher, it overwrites the file, otherwise the add does nothing)
- added error condition for missing data directory
-fixed Exit menu item

Last edited by LtChambers; September 23, 2009 at 08:54 PM. Reason: updated version

 

첨부파일 DBEditor_1-5-1.zip

 

다음검색
현재 게시글 추가 기능 열기
  • 북마크
  • 신고하기

댓글

댓글 리스트
  • 작성자력셔리 베엠베 | 작성시간 09.09.26 모르겠다...30분째 하고 있는데....변경이 안되네...ㅠㅠ
  • 작성자나는한놈만팬다 | 작성시간 09.09.26 팩파일 매니저는 아닌거 같고.... 뭐지??
  • 작성자tae-guen | 작성시간 09.09.26 오류뜨는저는 뭐죠??? 팩파일 매니저 인것같기는한대 왜저는 오류뜨죠? 저처럼오류뜨시는분 손
  • 답댓글 작성자나는한놈만팬다 | 작성시간 09.09.26 저도 오류 뜹니다.......
  • 답댓글 작성자력셔리 베엠베 | 작성시간 09.09.26 NET Framework 3.5 적용하기전엔 오류뜨지만 적용후엔 오류는 뜨지는 않지만 파일 수정이 안되더군요.
댓글 전체보기
맨위로

카페 검색

카페 검색어 입력폼