Skip to content

New Feature - BPD Editor?#1

Open
Siggless wants to merge 8 commits intoapocalyptech:masterfrom
Siggless:master
Open

New Feature - BPD Editor?#1
Siggless wants to merge 8 commits intoapocalyptech:masterfrom
Siggless:master

Conversation

@Siggless
Copy link

Hey up. I'm gonna look into making a BPD Editor, to make modding those less of a pain.
Since you already have the game data and graph tool, I was wondering whether you'd be interested in adding one to ft-explorer?
Maybe using something like NodeGraphQT.

@apocalyptech
Copy link
Owner

Hello! Not a bad idea, for sure. I'd often thought that a BPD editor would be quite handy, but I never got around to actually working on it, even when I was actively working on BL2/TPS modding. I know that I definitely don't have the impetus to try to integrate some kind of editor in here (after all, this project's really just focused on viewing), but a viewer, at least, might not be entirely out of the question.

If I were to try and merge at least a BPD viewer into this thing, I'd probably want to pretty much rewrite that bpd_dot.py stuff; it got to be a real mess behind-the-scenes. I also need to update this project to use the newer data format that OpenBLCMM started using; I was planning on even removing the bundled data from this project and having it pull from OpenBLCMM's data. It's a much nicer format than the kind of weird ad-hoc stuff I put together for this. But, that is also a pretty big chunk o' work (and in doing so I'd want to port over the handling of my BL2/TPS mod-creation tools, too). So, a kind of nasty ol' chain of work. Also I should probably get this up to a more recent PyQt version, or maybe switch over to PySide instead.

Anyway, all that said: for a viewer, at the very least, if someone were to put together a reasonable PR with that kind of functionality, I'd be happy to accept it, but I don't think I'm in the right headspace for it myself at the moment. :)

(Also, it'd probably be worth taking a look at what Zeta's been doing with the in-engine BPD mapping stuff which pulls directly from the game engine (via PythonSDK) -- that version's a lot more useful than my own grapher for folks working with BPDs nowadays, since PythonSDK lets you actually create brand-new objects with ease, rather than having to just edit existing ones.)

That NodeGraphQT project looks neat, btw -- thanks for that link!

@apocalyptech
Copy link
Owner

Oh, and that all said, OpenBLCMM's Object Explorer now honestly eclipses this app entirely in terms of functionality, IMO. I'd ended up having to redo a lot of that data backend for the OpenBLCMM release, and all the object metadata's in a nice SQLite database now, and accessing via OpenBLCMM is quite nice. Pretty much the only stuff that ft-explorer does that OpenBLCMM doesn't, now, is "collapsing" the top-level entries (GD_* or whatever, rather than listing out every single one with the same prefix), and having the programmatic backend. As I say, I do want to convert ft-explorer over to using OpenBLCMM's data backend, which would allow the Python library backend the ability to take advantage of the new stuff, so I think this project does still have a place. If someone were to be looking at doing a BPD editor, though, I wonder if OpenBLCMM would be the better place for it, since that project's very explicitly about mod creation, instead of just data viewing. 'course that's Java instead of Python...

@Siggless
Copy link
Author

Alright, here's a concept for what I'm thinking for a viewer.

NodeGraphQT was a bit too finnicky to get working - had to get an older version of Python to get PySide2 - so I kinda went rogue and tried just using PyQt5 widgets.

I didn't realise OpenBLCMM was in Java - or that its object browser could list everything like ft-explorer. I still find ft-explorer slightly more convenient to just jump to an object and see all the similar examples. I'll have a look at Java and Swing later, but I'd rather just slap something together in Python right now for a proof-of-concept.

bpd_gui and bpd_classes updated to edit the BPD data.
bpd_export_window to export edited BPD in hotfix format.
bpd_import_window to import BPD data not already in the game data.
events and behaviors jsons for auto-completers and variable link suggetsions.
Added generation of behavior and event json files, from all BPDs in the data.
@Siggless
Copy link
Author

I deed it. It's janky in both code and UI, but now you can edit the BPD data and export it.
I also generated all unique link names for behaviors and link connections for events, to help get those right from the existing data.

BTW I think the Wiki page is incorrect (or at least misleading) when it says we can't modify anything about ConsolidatedVariableLinkData and VariableData. Using this I've been able to create new versions of these lists (albeit simple ones) and it seems to work with passing variables around, so long as the variable links match what the event/behavior expects.

@Siggless Siggless marked this pull request as ready for review August 24, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants