Is there any reason not to use more .dmi files?

How, what and why to code in BYOND.
Post Reply
User avatar
Kyrah Abattoir
Joined: Sun Jul 27, 2014 9:38 am
Byond Username: KyrahAbattoir
Location: Centcom's plumbus factory
Contact:

Is there any reason not to use more .dmi files?

Post by Kyrah Abattoir » #282567

Dmi files are easily the most annoying ones to track on the git repo, is there an actual reason to condense so many things in a few dmis?

Can you have wearables span across multiple dmi files for instance?

My question is mostly related to the ease of maintenance of forks when it comes to custom icons, so they don't have to touch the same dmi files as the master branch.
User avatar
Thunder11
In-Game Admin
Joined: Fri Apr 18, 2014 12:55 pm
Byond Username: Thunder12345
Github Username: Thunder12345
Location: Scotland, UK

Re: Is there any reason not to use more .dmi files?

Post by Thunder11 » #282589

We have alternate_worn_icon, so you can already have any new clothing use a seperate .dmi
ImageImage
Spoiler:
IcePacks wrote:
MrFoster wrote:Back in my day, we didn't complain about lag! We used it to queue attacks!
That's thinking on your feet, soldier!
Quality Paprika from #coderbus wrote:[11:35.52] <paprika> holy crap so yeah i don't care about your opinion at all
oranges wrote:
Excuse me? Thats for sensible and calm rational debate, not for senseless whining.
Resident Catmin, please direct catposting to: https://tgstation13.org/phpBB/viewtopic.php?f=37&t=5578
User avatar
Kyrah Abattoir
Joined: Sun Jul 27, 2014 9:38 am
Byond Username: KyrahAbattoir
Location: Centcom's plumbus factory
Contact:

Re: Is there any reason not to use more .dmi files?

Post by Kyrah Abattoir » #282616

Excellent, a long time ago when I made some sprite stuff i just added to the existing dmi files, but this is prone to constant merge conflicts.

So there is no actual drawback to using a separate dmi per item/feature?
Scott
Github User
Joined: Fri Apr 18, 2014 1:50 pm
Byond Username: Xxnoob
Github Username: xxalpha

Re: Is there any reason not to use more .dmi files?

Post by Scott » #282648

It's just the old way of doing things, no particular reason other than "someone else did it so it is like this". dmi files actually have a limitation regarding the number of states, I think.
User avatar
Remie Richards
Joined: Thu Apr 17, 2014 7:11 pm
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Is there any reason not to use more .dmi files?

Post by Remie Richards » #282727

Scott wrote:It's just the old way of doing things, no particular reason other than "someone else did it so it is like this". dmi files actually have a limitation regarding the number of states, I think.
no they don't.
dmis can keep growing until they reach the maximum size of a png file.
they won't open in DM's editor past around 255 states though, but that's just DM being shit, the dmi itself is fine.
私は完璧
Scott
Github User
Joined: Fri Apr 18, 2014 1:50 pm
Byond Username: Xxnoob
Github Username: xxalpha

Re: Is there any reason not to use more .dmi files?

Post by Scott » #283043

Right, it's DM's limitation.
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Is there any reason not to use more .dmi files?

Post by MisterPerson » #283135

DM doesn't test if icon_states are valid but it would throw up an error if it can't find an icon file referenced in single quotes like icon = 'icons/mob/aibots.dmi'

It's hard to catch every case, but I would love to add a Travis test that makes sure all objects have a valid icon and icon_state combo. This would miss overlays, but those are pretty difficult to test for reliably frankly.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
User avatar
Kyrah Abattoir
Joined: Sun Jul 27, 2014 9:38 am
Byond Username: KyrahAbattoir
Location: Centcom's plumbus factory
Contact:

Re: Is there any reason not to use more .dmi files?

Post by Kyrah Abattoir » #283242

So there would be no harm in breaking down our current dmi files into a few hundred separate ones?
Scott
Github User
Joined: Fri Apr 18, 2014 1:50 pm
Byond Username: Xxnoob
Github Username: xxalpha

Re: Is there any reason not to use more .dmi files?

Post by Scott » #283244

As long as it makes sense.
User avatar
cedarbridge
Joined: Fri May 23, 2014 12:24 am
Byond Username: Cedarbridge

Re: Is there any reason not to use more .dmi files?

Post by cedarbridge » #283387

Kyrah Abattoir wrote:So there would be no harm in breaking down our current dmi files into a few hundred separate ones?
You'd have to go through every object in the game that uses a dmi, including mobs and structures, and edit their icon lines to point to their new icon locations in those several hundred new dmis.
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Is there any reason not to use more .dmi files?

Post by oranges » #283506

Have fun
User avatar
FantasticFwoosh
Joined: Mon May 04, 2015 11:25 pm
Byond Username: FantasticFwoosh

Re: Is there any reason not to use more .dmi files?

Post by FantasticFwoosh » #292127

Couldn't you reference a entire clothing set with

Code: Select all

icon_state = "Russian Clothing.dmi [list (Russian-Hat, etc. *or some other identifier*)]"

or 

icon_state = "Russian Clothing.dmi [pick (Russian-Hat, etc. *or some other identifier*)]
Etc? we already automatically call on hydroponic tray sprites just by referencing where they are held, because it reads the DMI names such as "potato-harvest" on conjunction with the rest of the sprites after defining how many growth stages to expect, as well as any expected abnormalities like poppies & mutations sharing the same growth but with different harvests & a similar death sprite.

Im not very proficient in code, but as far as choosing sprites non remotely, the way we pick out randomised floor tiles i would say is a good example of referencing appropriate images via tags we could use here.

For reference he's the basalt randomization in its original form

Code: Select all

icon_state = "basalt[rand(0, 12)]"

Spoiler:
Image
Image
User avatar
danno
Joined: Wed Apr 16, 2014 5:07 pm
Byond Username: Dannno
Location: e-mail me if you want a pizza roll

Re: Is there any reason not to use more .dmi files?

Post by danno » #292359

What would it matter if you did
Hornygranny wrote: wtf i like danno now
Image
I don't even play ss13 anymore, pretty much due to dannos stupid bullshit
Post Reply

Who is online

Users browsing this forum: No registered users