Bay 12 Games Forum

Please login or register.

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

Author Topic: Sort everything alphabetically.  (Read 12248 times)

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Sort everything alphabetically.
« Reply #15 on: March 09, 2012, 08:29:01 pm »

I just performed some experiments with a copy of DF where all the creature raws have been combined, alpabetized, and then split into smaller files, still in alphabetical order.

It is MUCH easier to make refuse piles that only take certain creatures this way.  Same with leather from specific creatures, and animal stockpiles that only hold certain animals.

Spoiler (click to show/hide)

Pets are mostly sorted, I'm not sure why Yaks are being listed before everything else.  Possibly because they're wagon-pullers?

Spoiler (click to show/hide)

A search by name function would also be nice.

Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Yaotzin

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #16 on: March 09, 2012, 11:13:53 pm »

Ooh, script please!

Assuming you did it by script. If you did that by hand you're insane :p
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Sort everything alphabetically.
« Reply #17 on: March 09, 2012, 11:51:03 pm »

The script isn't completely ready for public consumption yet.  There are some issues having to do with how the giant and animal-person variants have to be after the creature they're based on in the script, and the sorting algorithm doesn't reliably get it right yet.  I had to make the script perform the creature variation modification manually and save the result of that back to the raws first, and that required me to make some changes to the original raws to fix some inconsistencies and errors brought on by the absurdly excessive number of new giant creatures and animalpeople in the latest rev.  I'm still trying to put together something that can simply be run on the vanilla raws (or some arbitrary mod) without throwing errors.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Yaotzin

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #18 on: March 10, 2012, 12:20:43 am »

Fair enough, looking forward to it!
Logged

robertheinrich

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #19 on: March 10, 2012, 04:26:41 am »

This only solves the issue when lists are created based on the order of appearance in the RAWs (which is already quite something).

But another big problem, at least for me, are pastures, citizens and dead citizens/creatures (for slabs). Those lists are sorted chronologically which sometimes is nice (helps to assign that dozen of freshly hatched poults to nest boxes), but most of the times is just a big mess (rearranging pastures, finding specific names for memorials, ...)
Logged

Yaotzin

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #20 on: March 10, 2012, 06:51:14 am »

Yes agreed. Hence my title sort *everything* alphabetically.

The RAW thing is a hackjob, but it's better than nothing until Toady does something.

I see no real reason we can't have ever list in the game automatically alphabetized, with numerous options for sorting. By value, distance, quality, chronology, whatever.

It wouldn't even be that much work AFAIK. One function to for each type of sort, then it's just a matter of going and plugging them in everywhere, which is pretty trivial.
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: Sort everything alphabetically.
« Reply #21 on: March 10, 2012, 08:39:22 am »

Alphabetic sorting of lists
String search for lists >10 positions

Both of these sound like smart additions to DF, but it also sounds like either one would make the other obsolete.
So now my question will be: "Which one would be easier to implement and require less CPU power/RAM to operate?"

If I had to choose one, I'd prefer the string search. However, since Arena Mode's creature list is alphabetically sorted, it would probably be easier to implement the alphabetic organization...which would NOT obsolete the string search.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Sort everything alphabetically.
« Reply #22 on: March 10, 2012, 12:54:23 pm »

Somewhat experimental modification script has been uploaded.

http://dffd.wimbli.com/file.php?id=5837
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Adrian

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #23 on: March 10, 2012, 03:10:11 pm »

If I had to choose one, I'd prefer the string search. However, since Arena Mode's creature list is alphabetically sorted, it would probably be easier to implement the alphabetic organization...which would NOT obsolete the string search.
I don't know. The purpose of both the string search and alphabeticallization (is that even a word?) is to give us an idea of where to find a given entry in a list.
And while a string search is very useful for long lists with complex entries (like the historical figures) it loses most of it's practicality when the list is alphabetized, since we already know the location of the entry we're looking for.
And vice versa, there is no point in alphabetizing a list when we can simply preform a string search to find the entry we're looking for.

Also, Dwarf Fort is already a relatively complex game, and it's only going to get more complex as development continues. So my vote goes to sorting long lists alphabetically for now, seeing as how the lists would only have to be sorted once (at the time they are loaded) and saving on those oh-so precious CPU cycles.

However, the string search function's usefulness compared to alphabetical sorting increases with the length of the list, so maybe someone skilled in statistics needs to do some science (the IRL kind) in comparing both methods.
Logged

Di

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #24 on: March 11, 2012, 04:42:45 pm »

I don't know. The purpose of both the string search and alphabeticallization (is that even a word?) is to give us an idea of where to find a given entry in a list.
And while a string search is very useful for long lists with complex entries (like the historical figures) it loses most of it's practicality when the list is alphabetized, since we already know the location of the entry we're looking for.
I know where 'forge silver chain' is located but still I use manager for 95% of time to order those be made, even 1-2 pieces.
That's because typing (ten fingers) doesn't tire my hands as much as repeatedly mashing the same two buttons (with two fingers) at the same speed.

Also, Dwarf Fort is already a relatively complex game, and it's only going to get more complex as development continues. So my vote goes to sorting long lists alphabetically for now, seeing as how the lists would only have to be sorted once (at the time they are loaded) and saving on those oh-so precious CPU cycles.
Firstly, I disagree, it's not relatively, it's absolutely complex game. :)
Secondly, during the pausing, when search would be commenced by player, fps spikes back over several hundreds even in the most overloaded fortresses.
Logged
Quote from: Creamcorn
Dwarf Fortress: Where you meet the limit of your imagination, moral compass, sanity and CPU processor.
http://www.bay12forums.com/smf/index.php?topic=103080.0 Fix sober vampires!
http://www.bay12forums.com/smf/index.php?topic=91442.0 Dwarven Cognitive Science

Adrian

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #25 on: March 11, 2012, 09:16:07 pm »

.. during the pausing, when search would be commenced by player, fps spikes back over several hundreds even in the most overloaded fortresses.
I wouldn't know, since my Forts usually cap at around 60-70fps. (Let the record show that my laptop is crap.)

.. typing (ten fingers) ..
[cough]8fingersand2thumbs[/cough]
Logged

NTJedi

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #26 on: March 19, 2012, 04:16:21 pm »

I also would find the alphabetical sorting useful for the game. I've found it painful... separating the animals stockpiles, insect stockpiles, monsters stockpiles and goblin\troll\kobold stockpiles.    And it's a pure nightmare creating separate fat and tallow stockpiles!
Logged

tsen

  • Bay Watcher
    • View Profile
Re: Sort everything alphabetically.
« Reply #27 on: March 19, 2012, 06:03:49 pm »

If someone were to go through and do this, I would support a petition on ESV to immediately make it the standard for DF distros. Near zero work for ToadyOne, enhances playability. Win win.
Logged
...Unless your message is "drvn 2 hsptl 4 snak bite" or something, you seriously DO have the time to spell it out.

MarcAFK

  • Bay Watcher
  • [INSANITY INTENSIFIES]
    • View Profile
Re: Sort everything alphabetically.
« Reply #28 on: March 20, 2012, 06:36:40 am »

I agree, i also think leathers should be listed Under Alphabetical pages, it's easier to select leather, select E, then select eleplant leather, than selecting leather and scrolling down to where elephants are.
Same for meats since as i have said before that page has 12 times the clutter as the leather list since most animals have 12 types of meat and theres more animals that produce meat than produce leather.
I should probably also make another suggestion i just had in regards to the manager, when i scroll down the list to produce an item and click it the menu goes back to the start and i need to go through the same tedious scenario to get back to the same page when i'm adding 4x copper Breastplate/chainmail/helm/gauntlet/leggings/shoes/shield.
It might be nice if it stayed on the page you were already on.
Logged
They're nearly as bad as badgers. Build a couple of anti-buzzard SAM sites marksdwarf towers and your fortress will look like Baghdad in 2003 from all the aerial bolt spam. You waste a lot of ammo and everything is covered in unslightly exploded buzzard bits and broken bolts.

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: Sort everything alphabetically.
« Reply #29 on: March 21, 2012, 03:08:50 am »

Spoiler: Post to watch (click to show/hide)
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.
Pages: 1 [2] 3 4