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

Producible Items list should be sortable via scripts and UI #886

Open
MatGB opened this issue Aug 19, 2016 · 5 comments

Comments

5 participants
@MatGB
Copy link
Member

commented Aug 19, 2016

Description

It is now possible to reorder the ship designs list and this carries through to the producible items list. If something has not been reordered the list defaults to alphabetical by key name with buildings before ships, ships list by keyname then design time. It would be good if some method of sorting was available both to the player and for scripting, currently to move something within the list a scripter has to change its keyname, update all the stringtables and amend AI code.

Expected Result

Some method in which preunlocked and tech unlocked items can be given a priority number or groupname so that they all appear together, allowing—especially for predesigned ships—scripters to group things by type within the display to improve the UI and improve player workflow.

If players can also drag/drop to rearrange the list in some way this would be an additional benefit.

@MatGB MatGB added this to the post 0.4.6 milestone Aug 19, 2016

@MatGB

This comment has been minimized.

Copy link
Member Author

commented Aug 19, 2016

Specifically, I've got several parts into a reordering of the premade ships several times now and gotten sidelined or delayed, it's such a longwinded task for a very simple set of changes, as we can move ships up and down within the UI it should be possible to script a display order for them.

@geoffthemedio

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

Some overlap with, but better written than, #784

@adrianbroher adrianbroher changed the title [Feature] Producible Items list should be sortable via scripts and UI Producible Items list should be sortable via scripts and UI Aug 19, 2016

@Vezzra Vezzra modified the milestones: optional for v0.4.7, v0.4.7 Feb 12, 2017

@Vezzra Vezzra modified the milestones: optional for v0.4.7, v0.4.8 May 1, 2017

@LGM-Doyle

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2017

I've moved this comment from #784 where it was accidentally added.

@MatGB do the changes in the DesignWnd satisfy this feature request? In particular, the procedure that I have duplicated below to edit and/or re-order default ship designs and monsters.

And secondly, is there a good place on the website to place these instructions where scripters can use them as a reference?

------------------ Start of Instructions -------------------
Editing default ship designs and monsters

  1. Move or backup the shipdesigns directory in your freeorion data directory.
  2. Copy the default/scripting/ship_designs or default/scripting/monsters directory into your
    data directory and replace your shipdesigns directory.
  3. Start a new game.
  4. Your saved ship designs will now be the default ship designs or monsters. Edit the ships.
    i. Add new saved designs.
    ii. Drag and drop to change ordering.
    iii. If you use a stringtable index for both the ship name and description then it will save the stringtable index and use the translated text for display. You can check this in the pedia window. When you add/remove parts the name and description in the pedia window will be pulled from the stringtable.
    iv. Note: You can not start a ship with a monster hull, but you can add/remove components to monster designs in the saved design directory.
  5. Exit the game.
  6. Copy the shipdesigns directory from your data directory back into the default/scripting/ship_designs or default/scripting/monsters directory.

------------------ End of Instructions -------------------

@MatGB

This comment has been minimized.

Copy link
Member Author

commented Jun 28, 2017

It definitely does for ships, I'll get started on reordering the premades ASAP as it will make things a lot better in many ways.

But I'd still like to be able to script the order the buildings are displayed in so that, eg, all shipyards are together because we've told them to be, not because they happen to have similar names, then you can also reorder terraforming to be with gaia, etc.

I don't know whether it's better to have this as partially resolved or to close this and open a new one.

@LGM-Doyle

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2017

Leave it open.

Similar techniques could be used to implement the additional features and having them on the same page might result in solution that is consistent across all the UI windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.