Editor object order

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1844
Joined: Sun May 15, 2011 8:47 am

Editor object order

Post by enric » Mon Jun 11, 2018 10:35 am

In objects placement, selecting Russian, for example, I get all objets in the alphabetical order.
A friend asked me why he does not see the objects in the alphabetical order, as I can't answer why.
Can you help us, Pip?

pipfromslitherine
Site Admin
Site Admin
Posts: 8756
Joined: Wed Mar 23, 2005 10:35 pm

Re: Editor object order

Post by pipfromslitherine » Mon Jun 11, 2018 3:27 pm

I would guess that it depends upon how the OS decides to parse the files when I do the enumeration of the folder for the objects. The game doesn't do any internal sorting.

Cheers

Pip
follow me on Twitter here

enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1844
Joined: Sun May 15, 2011 8:47 am

Re: Editor object order

Post by enric » Mon Jun 11, 2018 5:45 pm

ummmm, digging inside I think the order in some folders comes from:
/Applications/BA2.app/Contents/Resources/DATA/TEXT/TEXT1.TXT
where some objects folder are enumerate, for example
IDS_O_desert,"Desert Objects",
IDS_O_desert_concrete_at_bunker_desert,"Large Bunker",
IDS_O_desert_concrete_bunker_desert,"Bunker",
IDS_O_desert_covered_bunker_desert,"Covere Bunker",
IDS_O_desert_crates_desert,"Crates",
IDS_O_desert_desert_boulder1,"Boulder",
So, in the Editor, the first Desert object is "Large Bunker," followed for "Bunker", an so on.

But this do not apply to all folders, and the most bizarre is that the order is NOT the same in all computer, even with the same OS version, see the images.
BA is a surprises box!
iMac shows Russian objects ordered:
Editor.jpg
Editor.jpg (91.21 KiB) Viewed 3181 times
Powerbook doesn't:
Editor PowrBook.jpg
Editor PowrBook.jpg (89.15 KiB) Viewed 3181 times

pipfromslitherine
Site Admin
Site Admin
Posts: 8756
Joined: Wed Mar 23, 2005 10:35 pm

Re: Editor object order

Post by pipfromslitherine » Mon Jun 11, 2018 8:21 pm

Dunno what to say - Windows consistently gives back the same order which is likely why it doesn't try and normalize the order.

Cheers

Pip
follow me on Twitter here

enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1844
Joined: Sun May 15, 2011 8:47 am

Re: Editor object order

Post by enric » Tue Jun 12, 2018 7:27 am

This is another mystery cause deep in the Unix core of MacOS, when reading a directory, by default, it returns the list in alphabetical order.
Probably BA doesn't use the OS directrices to get the files.

Post Reply

Return to “Battle Academy 2: Modders Corner”