Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Systems Editor #4291

Closed
wants to merge 30 commits into from
Closed

WIP: Systems Editor #4291

wants to merge 30 commits into from

Conversation

mooskagh
Copy link

@mooskagh mooskagh commented Jan 24, 2018

That was initially PR #4173, but I had to revert that because I messed up git branches. Sorry for the noise.

So far it's not an editor but "viewer" that shows ugly tables.
Deps: python3 only, no other libs needed.
(may also work under python2 but I doubt).

Running:

  1. Start main.py
  2. Open http://localhost:9914/ in browser

In progress:

  1. Make it editor rather than viewer

Next steps:

  1. Tidy up tables.
  2. Add better display of values (type-specific, e.g. mass angle etc)
  3. Add simple graphical visualization of systems.

This change is Reviewable

@SpifforOmnivore
Copy link
Contributor

Well, I'm very interested 👍
Currently, I'm creating my custom systems "by hand": I manually copy all system info with my keyboard, looking at one screen playing Pioneer, and writing the system.lua on the other screen.

Maybe also it would help other people who have ideas for custom systems, but don't want to delve in lua files

Is there any way to test this PR?

@fluffyfreak
Copy link
Contributor

@SpifforOmnivore this PR would be great to have, however you're doing it all by hand?

Open the console window ingame and type import("Game").system:ExportToLua(), that'll export the system that you're in to a lua file with the same name as the system.

@SpifforOmnivore
Copy link
Contributor

Thanks very much Fluffyfreak for the tip! 👍

@impaktor
Copy link
Member

@SpifforOmnivore I suspect the wiki is lacking/lagging behind on documentation for custom systems, so please feel free to add useful information there, on how to write custom systems

@Web-eWorks
Copy link
Member

Rather than implementing this in an external tool (and having to write a Lua parser by hand, etc.), wouldn't it just be simpler to implement this as an in-game tool (or another game mode, similar to the modelviewer)?

You haven't provided any screenshots or information about what specifically you want this tool to do, so I can't really provide pros and cons of doing this in an external tool vs. in-game, but I can say that introducing 2.2k+ lines of Python and making this a web-based tool is going to introduce a significant amount of upkeep and support work.

It's understandable if you don't have much Lua/C++ experience, but especially for the visualization of the system, I'd prefer to leverage the already-existing renderer / code for this purpose rather than write an entirely new, unsupported (even if simple) visualization and editing tool. Additionally, if we use the game's existing visualization functions, live testing of the new system would be fairly easy to implement as well.

Admittedly, the downside to using the existing code for system visualization is that it may require a somewhat extensive rewrite to support changing a system's content on the fly (things may be keeping unchecked references where they shouldn't), but I haven't taken a thorough look at it yet.

I personally would be extremely hesitant to merge this PR given my limited understanding of these ramifications; but that's only my opinion, as I'm not part of the merge team.

@Web-eWorks
Copy link
Member

Given this PR has set for at least a year and a half with no activity, and that it's introducing an entirely new Python codebase to visualize systems, I'm going to bite the bullet and close it.

If you'd like to bring this branch back up for merge, feel free to re-open it and address the concerns laid out above.

@Web-eWorks Web-eWorks closed this Dec 13, 2019
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.

5 participants