ID:133409
 
How about a mass # icon_state Renaming feature.

I know there is like where when you import an image, it will auto-split the icons into 32x32 seperate icon_states automaticly, but if you import another image into that same dmi file, you have to manually rename each of thoes extra imported icon_states becasue they will have the same number sequence after the previous split icon_states.

I suggesst a Mass # icon_state Renaming Feature, which when activated, it will auto-name all icon_states in the DMI file with the optional # place values, like if the icon file will have less than 100 icon_states in it, you could chose the
## option which will name them like

01, 02, 03, 04, 05, 06, 05, 08, 09, 10, 11... all the way to 99

and a ### feature for a dmi with less than 1000 total icon_states like

001, 002, 003, 004, 005, 006, 005, 008, 009, 010, 011... all the way to 999.

of course, this feature would be like format all the icon states in DMI file to the number ordering.

icon_states that just start with 1,2,3...,9,10,11, etc...
becomes very un-organized. especially when you are pasting them in mass, so this way with the number icon_state format option, could make them a whole lot more organized ^.^
You could just select all, cut, and paste them back. DM automatically gives them icon states numerically. Just uncheck "Use size from file" before you paste, and make sure the file size is 32x32.

Why would you need any zeros in front of the number?
In response to Kaiochao
Kaiochao wrote:
You could just select all, cut, and paste them back. DM automatically gives them icon states numerically. Just uncheck "Use size from file" before you paste, and make sure the file size is 32x32.

Why would you need any zeros in front of the number?

It's to keep them organized
For thoes who like to keep consistant numerical values.
In response to ElderKain
ElderKain wrote:
Why would you need any zeros in front of the number?

It's to keep them organized
For thoes who like to keep consistant numerical values.

Really, the only use of having zeroes in front of numbers is for it be ordered properly when being sorted. Since icon_states aren't ordered by name, it's not necessary, and it requires extra work to append zeroes in front of numbers when actually programming.
In response to Unknown Person
Unknown Person wrote:
ElderKain wrote:
Why would you need any zeros in front of the number?

It's to keep them organized
For thoes who like to keep consistant numerical values.

Really, the only use of having zeroes in front of numbers is for it be ordered properly when being sorted. Since icon_states aren't ordered by name, it's not necessary, and it requires extra work to append zeroes in front of numbers when actually programming.

Well for thoes people like me who like to have the icon_states name and the object's tree name the same, the numbers in the same manner makes it very organized like

with the ## format
turf/townbuildings/building01
turf01
icon='buildings01.dmi';icon_state="01";name="";density=0
turf02
icon='buildings01.dmi';icon_state="02";name="";density=0
turf03
icon='buildings01.dmi';icon_state="03";name="";density=0

with the ### format
turf/townbuildings/building01
turf001
icon='buildings01.dmi';icon_state="001";name="";density=0
turf002
icon='buildings01.dmi';icon_state="002";name="";density=0
turf003
icon='buildings01.dmi';icon_state="003";name="";density=0


having them all together where the numbers are the same through keeps the text likes at equal length and makes the coding look nicer.

If the Number lines go past in the 10s or 100s places, all the lines will be of equal spacing, thus making the code look nice.
In response to ElderKain
I guess if you're that picky about code spacing, it would probably be a lot easier for you to use tabs instead of spaces, as they have a common alignment.
In response to Unknown Person
Unknown Person wrote:
I guess if you're that picky about code spacing, it would probably be a lot easier for you to use tabs instead of spaces, as they have a common alignment.

I'm talking about the number spacing like

look at this
turf/townbuildings/building01
turf1
icon='buildings01.dmi';icon_state="1";name="";density=0
turf50
icon='buildings01.dmi';icon_state="50";name="";density=0
turf100
icon='buildings01.dmi';icon_state="100";name="";density=0


see how they don't look alright where they are evenly spaced.

and
here is with the ### numbering
turf/townbuildings/building001
turf001
icon='buildings01.dmi';icon_state="001";name="";density=0
turf050
icon='buildings01.dmi';icon_state="050";name="";density=0
turf100
icon='buildings01.dmi';icon_state="100";name="";density=0

see how they all the lines look even.
I'm a perfectionist when it comes to making things line up exavtly when it's like that.
and having to re-name each individual one with the 0s is a real pain, that's why I was suggesting this,
In response to Unknown Person
Really, the only use of having zeroes in front of numbers is for it be ordered properly when being sorted. Since icon_states aren't ordered by name, it's not necessary, and it requires extra work to append zeroes in front of numbers when actually programming.

Prepend? =P

Anyways, I'm not sure if this manner of suggestion would have a wide enough use (or acceptance) to warrant an addition to the Dream Maker program, not to mention some would want to add strings before or after the numeric portion, or perhaps part of a regular expression token. It sounds more like third-party territory, really.

Now what we could really use, is native regular expression support =D
In response to Mobius Evalon
Mobius Evalon wrote:
Really, the only use of having zeroes in front of numbers is for it be ordered properly when being sorted. Since icon_states aren't ordered by name, it's not necessary, and it requires extra work to append zeroes in front of numbers when actually programming.

Prepend? =P

Anyways, I'm not sure if this manner of suggestion would have a wide enough use (or acceptance) to warrant an addition to the Dream Maker program, not to mention some would want to add strings before or after the numeric portion, or perhaps part of a regular expression token. It sounds more like third-party territory, really.

Now what we could really use, is native regular expression support =D

well it's not like a major suggestion, It's just a small option to make naming icon_states a bit easier and keep them all within the same number spacing values.
In response to ElderKain
ElderKain wrote:
well it's not like a major suggestion, It's just a small option to make naming icon_states a bit easier and keep them all within the same number spacing values.

Well that's why I say we go with regular expressions, since native support for it within Dream Maker could likely open up lots of useful things besides programming uses, like mass renaming a file's icon_states.
In response to Mobius Evalon
Mobius Evalon wrote:
ElderKain wrote:
well it's not like a major suggestion, It's just a small option to make naming icon_states a bit easier and keep them all within the same number spacing values.

Well that's why I say we go with regular expressions, since native support for it within Dream Maker could likely open up lots of useful things besides programming uses, like mass renaming a file's icon_states.
I never said that it would be like a Major bug fix suggestion or something super extravigant, it's just a small idea
In response to ElderKain
ElderKain wrote:
look at this
turf/townbuildings/building01
> turf1
> icon='buildings01.dmi';icon_state="1";name="";density=0
> turf50
> icon='buildings01.dmi';icon_state="50";name="";density=0
> turf100
> icon='buildings01.dmi';icon_state="100";name="";density=0

see how they don't look alright where they are evenly spaced.

But with three manually-added spaces:

turf/townbuildings/building01
turf1
icon='buildings01.dmi';icon_state= "1";name="";density=0
turf50
icon='buildings01.dmi';icon_state= "50";name="";density=0
turf100
icon='buildings01.dmi';icon_state="100";name="";density=0


(I'd also put spaces after every semicolon, myself, but that's just how I do things.)

In any case, most advanced code is hugely dependent on the fact that you can easily get a number into an icon state by using "[number]" in a DM verb or proc. Changing that default behaviour would require BYOND developers to pad all such numbers with leading zeros, which is definitely not for amateurs and a pain in the butt and/or inefficient for experts.

You're basically proposing a sweeping language change for purely aesthetic reasons, and that's just silly. =)
In response to Jtgibson
Jtgibson wrote:
But with three manually-added spaces:

> turf/townbuildings/building01
> turf1
> icon='buildings01.dmi';icon_state= "1";name="";density=0
> turf50
> icon='buildings01.dmi';icon_state= "50";name="";density=0
> turf100
> icon='buildings01.dmi';icon_state="100";name="";density=0
>

(I'd also put spaces after every semicolon, myself, but that's just how I do things.)

In any case, most advanced code is hugely dependent on the fact that you can easily get a number into an icon state by using "[number]" in a DM verb or proc. Changing that default behaviour would require BYOND developers to pad all such numbers with leading zeros, which is definitely not for amateurs and a pain in the butt and/or inefficient for experts.

You're basically proposing a sweeping language change for purely aesthetic reasons, and that's just silly. =)


I wasn't asking for a full revamp of the code...
I was just suggesting an option for a feature wich will auto-rename the icon_states in the DMI file to have number naming which are even in length.

also with the way you showed the above code, the tree for the icons which are places on the Map files would still be off, becasue of the number ordering, it would go
turf1
turf100
turf50
on the tree because of the naming, and personally Id perfer the icon_states to have the same number sequence as the tree name for that icon_state.

I know that it's a aesthetic reason, but having a feature like this would make the coding look nicer in my opinion when put into account.

that's just my opinion, but still it's a suggesion idea for a feature.