Adding a new/custom icon (bear with me, this is my first "tutorial") w/pics

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Adding a new/custom icon (bear with me, this is my first "tutorial") w/pics

Post by fud »

So, don't lambast me, I'm not used to explaining stuff in easy steps for people. :P

Anywho:


So, you've got your shiny new weapon, but no custom icon. Oh, the dismay. :lol:

After several hours of trial and error (more error than trial) and a few stitches to the nogging and a bill from the plasterer, I've gotten a new icon to show on the hud.

*Instructions assume you have acces to PhotoShop, tho I’m sure the process is similar in paint shop and have a basic working knowledge of either program. Most of these steps are fairly basic.


Open gui_master.dds (need the NV DDS plugin

http://eliteforce2.filefront.com/file/D ... 2#Download

I always make sure the box with "mips" is checked. I've had bad results with it unchecked.

[ external image ]

Now, with it open, where you want to add your new icon is in the blank slots (click picture for bigger version) which are numbered in red text.

[ external image ]

These are the slots for your icons. The easiest way to add one, is to copy & paste and existing one, and modify it. For this example, I’ll make a GHEPT icon:

[ external image ]

Copy and paste the BHEPT icon, then drag it to one of the empty slots, make sure to line them up correctly. IconData.txt uses specific pixels in the gui_master file to locate an icon. Having it a pixel off will screw it up.

Now that you’ve got it there, you can edit it, anyway you want to. But, keep in mind, the size of the space it occupies (the overall rectangle area) can’t be more than 53x20 (WxH) pixels.

I added a third “Gamma” bar to it:

[ external image ]


Now, the key part, the alpha channel:

You must edit the alpha channel or your icon will not appear. If you don’t put the icon sillouette in the alpha channel, you’ll have an invisible weapon in-game.

Just follow the same routine of copy/paste/edit as with the normal icon:

[ external image ]

Now that you’ve got everything added/edited that you want, you can save it. (click for bigger)

[ external image ]

Make sure you have Alpha Channels checked.

Further saving options (click for bigger):

[ external image ]

I only changed the 8:8:8:8 ARGB 32 option, and the no mips. Everything is left to default.

Voila. You now have a new gui_master.dds file.


Now, the other parts to finish the process (this will also assume you have some knowledge of using the text editor, and editing Tfiles):

Assuming you’ve gotten your new gun (in this case the GHEPT) in the other bits, text file (44001 or your language, or an addon) so the game knows it’s name, bullet that goes with it. All you need to do to assign the new icon is change the HUD Icon Value to the location of the icon you put in. In this case “ICON_L_D92” (click for bigger)

[ external image ]

Edit that, save, and you’re done.

I’ll leave the other bits to the other tutorials on how to add the gun, bullet, name, etc, then add it to your ship as a compatible weapon, and add it to an EQ dock. :P It’s not *too* painful a process to add a new gun, complete with icon, there’s just several small steps.

[ external image ]


***I'll ammend this as soon as I get my head around how to fix the =TextIDNotFound= mouseover....

[ external image ]

:headbang:


Edit: how conceded of me: :oops:

I would like to thank red spot, doubleshadow and northstar for their assistance.


Note: doubleshadow, there appears to be no reason to edit the icondata.txt file. In fact, editing it will **** up the HUD something aweful. :o
doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow »

So I remembered correctly that there is *some* problem...

You should upgrade your X3E to version 0.6. Better support for TLasers ;)

See here.

You must download the Developer's Image Library for X3E to be able to see the icons (at the x3e download page as well).
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

Cool. I'll update when I get home. :thumb_up:
neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 »

bumping an ancient topic...

fud,
Do you still have the pics you used when you made this guide? I've had a lot of people asking me questions about how to do this stuff and since I learned from your guide... I was hoping we could get them posted on mediafire or something..

Also, there are good reasons to edit icondata.txt (I know, you probably figured this out already, but in the interest of improving the guide...). I had to do so to add icons for M7s. Also, I was able to work around the XTM lifeform issue much easier using icondata than a separate gui_master. The hard part is figuring out the coordinate system (never really perfected that... just did trial and error for my icons).

Thanks,
Neuman
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

I don't know if I've still got them around or not. My host has since changed (and I lost all my stuff as a result).

The coordinates can be tricky indeed. :)
Thraxwhirl
Posts: 683
Joined: Fri, 17. Feb 06, 20:54
x3ap

Post by Thraxwhirl »

Oh, I really hope you could find the pics again, Sir.

I've been desperately wanting to change the icon for Lifeforms(XTended mod) so that they don't look like a weapon on the Sector Map.
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

Well, if I remember right, they used the AHEPT (on/selected) icon slot for that. So, you could, in theory, cross reference that with icondata and apply it that way.


Either that, or you can use the un-used slots ie ICON_L_D104, etc. I made/added new icons for A/BEMPC as well. The default uses the AIRE icon.

Let me see if I can find those pics. If not, I'll make a new one.
neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 »

I pointed Thraxwhirl over here since he wanted to make a graphical change to the icon. I was able to work it all out using just the text in the past. Maybe I'll see if I can get you some pictures or the like one of these days.

BTW - Recommend you point folks to the actual dds plugins here instead of the DDS converter. I always found the converter messed up my images slightly.
Thraxwhirl
Posts: 683
Joined: Fri, 17. Feb 06, 20:54
x3ap

Post by Thraxwhirl »

At risk of asking a stupid question....

... these .dds files(even with the tools) can't be altered in Paint, right? Only Photoshop. I just wondered 'cos, I don't have Photoshop, and I seem to recall it costs like hundreds, possibly millions(well, certainly hundreds) to buy it... which is a considerable expense just to make the Lifeforms use the same icon as M5s or Nav. Beacons.

Not that I don't appreciate the help - I do - but it sounds like a LOT of money to spend just to stop a Rock Beetle looking like a HEPT.

fud. You say that you made Icons for the Unused slots, yeah? Is there a way I could simply copy an M5 or Nav Beacon icon into an unused slot, and then somehow make the game use that slot, and its icon, for Lifeforms?
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

Outside of photoshop, I don't know. It's what I use (with the DDS plugin). I don't know if NV makes a DDS plugin for paint or not, you can try searching.

There are several empty gun/missile slots in the gui_master (which I loosely labeled):

[ external image ]

In XTM, they relocated the AHEPT icon to D98. The LI class icon is used where the original AHEPT (highlighted/selected) icon is. As you can see in the above section, I also added new icons at D104 and D106 (AEMPC and BEMPC). This is referenced in TLasers for display within the game in the HUD.


I have a new found interest in HUD work again, so I may play with some things. It's been almost a year, I'm due.
Thraxwhirl
Posts: 683
Joined: Fri, 17. Feb 06, 20:54
x3ap

Post by Thraxwhirl »

I seeeeeeeeeee(I think?).

Well, I have XTM's two Gui_master files in my .cat of course, but for some reason, the LIs are still using the AHEPT icon. Do you suppose maybe I'm missing XTM's .dds file for LIs? Ie. the one that went into the old A-HEPT slot?

Any idea how I could instruct the game to get the right refs.?

Obviously I don't want to end up with both the A-HEPTs and the LIs using the same file.
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

If you look at the section I posted, to the left of the D98 icons (new AHEPT locations), you will see the XTM "LI" icon.

That is from their gui_master (with my additions). If you don't have that, then something is in the wrong place (another wrong gui_master in a higher numbered cat/mod folder, etc).
User avatar
Tenlar Scarflame
Posts: 3359
Joined: Mon, 30. May 05, 04:51
xr

Post by Tenlar Scarflame »

Thraxwhirl wrote:I seeeeeeeeeee(I think?).

Well, I have XTM's two Gui_master files in my .cat of course, but for some reason, the LIs are still using the AHEPT icon. Do you suppose maybe I'm missing XTM's .dds file for LIs? Ie. the one that went into the old A-HEPT slot?

Any idea how I could instruct the game to get the right refs.?

Obviously I don't want to end up with both the A-HEPTs and the LIs using the same file.
Are you using the Minimal HUD mod? That screws up the same icons, and when I removed the Minimal HUD mod it corrected the mix-up.
My music - Von Neumann's Children - Lasers and Tactics

I'm on Twitch! 21:15 EST Sundays. Come watch me die a lot.
neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 »

Ok, Thrax, here's an easy solution for you:
Install any non-XTM compatible hud mod you want (or you can use mine - this will work with it - sort of - you'll lose the M7 icons). Make sure the hud mod is a higher numbered false patch than XTM.
Create a new false patch with a higher number and put ONE of these files in there. The text of the link tells you what the lifeform will point to.
Run your game. It will fix your problem

Bottom Line: Putting one of these in a higher-numbered false patch will make NEARLY ANY non-XTM-compatible mod compatible (Exception: It will break - at least in part - any hud mod that already modifies icondata.txt [like mine]). It will fix the problem for anyone who has lifeforms showing up as guns and active AHEPTS showing up as rocks.
LI = Nav beacon
LI = RED ASTRONAUT
LI = UFO
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

The XTM only adds the LI icon, as far as I noticed. I modified a gui for my own use, but it had it's issues (due to their version). It was easy enough to fix, since they didn't modify the right half of the gui_master (the part with the reticules/etc), I just overlayed their left over my right.
XTM also did *not* edit icondata.
But, without photoshop, that's pretty hard to do.


I'll probably spend the next couple nights playing with things again, as I've got new interest in it.
neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 »

fud, you are correct based on my conversations with them when I was making my hud mod XTM compatible... They only changed the LI icon and moved AHEPT to Dummy 98 (IIRC).

Rather than make the changes on my gui_master, I just fixed it in icondata, since I already had changed icondata anyway (added M7 icons). That's why it's easier for me to have Thraxwhirl just replace his icondata - especially since he wants to use an existing icon. I just copied the location pointed to by those other icons to the appropriate pointer (the active AHEPT one).
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

Right, I was just explaining how, in his case, editing the gui on his end was not feasible. :)


Editing icondata is very effective and doesn't require anything other than notepad.In my case, I made new icons for the terran guns, as I thought they should have their own.

I haven't messed with icondata yet, but I have looked at it quite a bit and understand it. You could really do about anything with it as far as changes go, that I've seen.


Hmmm, looking at it again, I'm not sure where/how they call that particular icon. In TShips, the picture ID is 703, and there's no reference (that I can see) to the LI class pointing to the AHEPT slot in the gui...

I like puzzles.
neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 »

What they told me is that it is hard-coded for the lifeform ship-class (Can't remember it's class number) to point to ICON_LSR_HEPT1_HL. I got the impression they even pursued it over on the DEV forums to double-check. It was probably a typo/bug in the initial release that never got corrected because they didn't intend to put in lifeforms.

And I just double-checked, XTM DID change the AHEPT pointer to ICON_L_D98.
fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud »

neumanf15 wrote: And I just double-checked, XTM DID change the AHEPT pointer to ICON_L_D98.

Yep. I was just wondering how the LI thing worked. I guess nobody really knows. :)
neumanf15
Posts: 259
Joined: Mon, 26. Dec 05, 19:55
x3

Post by neumanf15 »

Basically, yes. :P

Return to “X³: Reunion - Scripts and Modding”