Custom unit icons

Custom unit icons

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Custom unit icons

Post by colorblind »

In the next release units will be replaced with icons when they're far away and on the minimap. It'll look something like this:

Image

Mod makers have the possibility to create custom icons for units. See the wiki for more info: http://taspring.clan-sy.com/wiki/CustomUnitIcons
Please read that Wiki page before posting questions here.

You can grab the dev build to test it out here: http://taspring.clan-sy.com/dl/spring_0.73b1_dev.exe

Note that thanks to the new Spring Data Dir feature you don't have to pack your mod everytime you made a change; just place it unpacked in /mods/yourmod.sdd/ .

You can grab a set of test icons here:
http://teake.home.fmf.nl/temp/unit_icons.zip

If you want to change the distance at which units become icons, you'll have to add an extra DWORD "UnitIconDist" to \HKEY_CURRENT_USER\Software\SJ\spring. The default value is 200 (in decimals). Don't worry, this will be added to settings.exe in the next release :P.
Last edited by colorblind on 13 Aug 2006, 10:39, edited 7 times in total.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Nice work, but can you make it optional? I prefer no icons tbh, though others might like it.

I have no internet on my development pc for at least 2 weeks, so you'll have to make the test build yourself.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Modding feature FTW.

How is teamcolour controlled?
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

Pwnalicious.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

Das Bruce wrote:How is teamcolour controlled?
The icons get blended with the teamcolor. So there's no special team color channel.
User avatar
Drone_Fragger
Posts: 1341
Joined: 04 Dec 2005, 15:49

Post by Drone_Fragger »

hooray. The wpring community spewed forth someone to do this! WE WIN! ALL HAIL COLOURBLIND! BRINGER OF SUPCOMSTYLEZOOMTHING!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

finally, somethign similar to the HW sensor mdoe I've bene going on about for nearly a year
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

looks nice. Having blobs on that scale is more usefull then several pixels that indicate that it might be a unit ;)
alik83
Posts: 82
Joined: 08 Sep 2004, 15:32

Nice work;)

Post by alik83 »

Nice work;) Colorblind!
So as I understood you could specify in the mod a custom icon for each unit with custom size multiplier.
So to get into this view you must zoom out fully? (with TAB)
If you specify custom sizes for icons(make them bigger) and they will overlap, will the selection of units work correctly (what happens if you click on a overlapped region?, would clicking on the edge of icon select the unit?(when the unit itself is smaller))
Keep up the work- this feature would be a great addition;)
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Also: Can it be made so that we modders can control how far away (from the camera) units must be to become icons?
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

Cool!
User avatar
Lindir The Green
Posts: 815
Joined: 04 May 2005, 15:09

Post by Lindir The Green »

It should be set up so that modders get to decide:

-at what distance the unit starts "morphing" into an icon.

-at what distance the unit finishes "morphing" into an icon.

-what the icon looks like.

And they should be seperately defined for each unit.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Guessmyname wrote:Also: Can it be made so that we modders can control how far away (from the camera) units must be to become icons?
+1

And lindr outside of distant the rest is covered if you read the wiki.
colorblind
Spring Developer
Posts: 374
Joined: 14 Mar 2005, 12:32

Post by colorblind »

The distance at which units become icons will be user-configurable (and not mod-configurable).

The unit collision sphere, and not its icon, is used when making selections. So if you click on the edge of the icon of a smaller unit, it will not get selected. This might be subject to change though.

And units do not morph into icons (they just get replaced with icons when their distance to the camera exceeds a certain limit).
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Colorblind, that really will be an issue in my mod. The whitebase and GAW are 40X40 footprints. They can be seen just fine. Also there are other units that are/will be in eventually that are large enough to see just fine. I really urge you to allow us to set a distance for specific blips.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Yeah, perhaps let the mod define it, then the user's config scales that up/down... that way large units behave as you'd expect, but the user can still turn down the settings if he needs to.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

doesn't swta also have units that can benefit from this gnome?
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

I don't think any mod lacks units which could benefit from it :P

(oh, and where's the option to turn off auto radar targetting???)
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Oh man... While I certainly appreciate the feature, it's sure going to be a bugger to edit 380 units to give them all a special icon.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Caydr wrote:Oh man... While I certainly appreciate the feature, it's sure going to be a bugger to edit 380 units to give them all a special icon.
We'll see you in a week.
Post Reply

Return to “Engine”