Custom devel icons problem

Discussion area for user-created Allegiance models, textures, voicechats, music, and other ingame content.
Bunnywabbit
Posts: 965
Joined: Sun May 15, 2005 7:00 am
Location: Amsterdam, the Netherlands

Post by Bunnywabbit »

Also, you might create a text.mdl file in artwork folder and put the following code in:

example.mdl

Code: Select all

use "model";

example = 
           ImportImageFromFile("artimage.png", true);
note that the variable you define here is the same as the file name.

Also note that your file can be semi transparent now! Just forget about using black for transparent bits and create art using transparent background.

although i do admit that it's a shame you have to use two files for a single piece of art.
ImageImage current version r158 new beta as of jan 23 2012
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

does it work if you remove the number from the start of the file name?
Jersy
Posts: 250
Joined: Fri Aug 29, 2008 6:30 pm

Post by Jersy »

Bunnywabbit wrote:QUOTE (Bunnywabbit @ Mar 13 2011, 11:31 PM) Also, you might create a text.mdl file in artwork folder and put the following code in:

example.mdl

Code: Select all

use "model";

example = 
           ImportImageFromFile("artimage.png", true);
note that the variable you define here is the same as the file name.

Also note that your file can be semi transparent now! Just forget about using black for transparent bits and create art using transparent background.

although i do admit that it's a shame you have to use two files for a single piece of art.
What does this do, exactly? What is the "model" and how does this assign the proper icon for the devel?
madpeople wrote:QUOTE (madpeople @ Mar 14 2011, 12:57 AM) does it work if you remove the number from the start of the file name?
Mmm... No, that was not enough... But when I changed the name to abc.bmp/abcbmp.mdl, it miraculously went and worked on me...

So it seems to be filename related - its either the numbers or the lenght of the file...

Hmmm...

So THAT was the problem... Seems like convert.bat cannot handle anything with more than 8 characters before .mdl... And since the first of those 8 has to be "i" (or at least it would seem that all devel icons need to start with "i") and the last three need to be "bmp", then I would be stuck with four letters to describe the file, which is not adequate and ultimately won't solve the problem, only get around it, as I see many perfectly working devel icons, that have more than 8 letters before .mdl, indicating they were created in some other way...

Although, to be fair, it actually works...

I guess will look into it and into something else some more, see what I can come up with...

thx ;-)

EDIT:

So yeah, the butler did it, and if I say "butler", I mean filename lenght... *shrugs* whatever, then I'll just deal with that :-)
Last edited by Jersy on Mon Mar 14, 2011 8:12 am, edited 1 time in total.
-----------------------------------------------------------------------------------------------------------
Image
Link: Allegiance Stuff on "Jersy's Ultimate Blog of Concentrated Nerdiness"
Current stuff-count: 97
(Latest update: March 7th, 2011, in "Jers_Core Diary")

Stationed in CZECH REPUBLIC (link)
(GMT+1)
Bunnywabbit
Posts: 965
Joined: Sun May 15, 2005 7:00 am
Location: Amsterdam, the Netherlands

Post by Bunnywabbit »

Bunnywabbit wrote:QUOTE (Bunnywabbit @ Mar 13 2011, 11:31 PM) example.mdl

Code: Select all

use "model";

example = 
           ImportImageFromFile("artimage.png", true);
use "model"; means that the functions used in this code are part of the 'model' namespace. In other words: I haven't a $#@!ing clue what it means, but i put it in because smart people do it too and it sometimes breaks the code if i leave it out.

ImportImageFromFile does pretty much what it says on the tin. You can make subdirectories in the Artwork folder for your core art and keep things tidy. Then reference them as "ImportImageFromFile("subdir/artwork.png", true);"

I don't know what the boolean at the end there does. I think it's supposed to have something to do with using black as a transparency color, but i haven noticed any effect in changing it.
ImageImage current version r158 new beta as of jan 23 2012
Jersy
Posts: 250
Joined: Fri Aug 29, 2008 6:30 pm

Post by Jersy »

Bunnywabbit wrote:QUOTE (Bunnywabbit @ Mar 14 2011, 11:37 AM) use "model"; means that the functions used in this code are part of the 'model' namespace. In other words: I haven't a $#@!ing clue what it means, but i put it in because smart people do it too and it sometimes breaks the code if i leave it out.

ImportImageFromFile does pretty much what it says on the tin. You can make subdirectories in the Artwork folder for your core art and keep things tidy. Then reference them as "ImportImageFromFile("subdir/artwork.png", true);"

I don't know what the boolean at the end there does. I think it's supposed to have something to do with using black as a transparency color, but i haven noticed any effect in changing it.
So then you have a text.mdl file with some code that assigns the actual image to some blank .mdl file, which is then used in the core?
-----------------------------------------------------------------------------------------------------------
Image
Link: Allegiance Stuff on "Jersy's Ultimate Blog of Concentrated Nerdiness"
Current stuff-count: 97
(Latest update: March 7th, 2011, in "Jers_Core Diary")

Stationed in CZECH REPUBLIC (link)
(GMT+1)
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

regarding the file name length limit, did the example work for you?
"mdlc -convert space.bmp environment1bmp.mdl"

Is the problem that the game won't load adevlbmp.mdl but it will load idevlbmp.mdl ? Or just that you noticed that all existing ones begin with i so you figure you should be consistent?

The "model" is just the word you need to use to make it work.

You make a text file called [name here]bmp.mdl

It contains

Code: Select all

use "model";

example = 
           ImportImageFromFile("artimage.png", true);
where artimage.png is the name of the image you want to use.
Jersy
Posts: 250
Joined: Fri Aug 29, 2008 6:30 pm

Post by Jersy »

madpeople wrote:QUOTE (madpeople @ Mar 14 2011, 12:10 PM) regarding the file name length limit, did the example work for you?
"mdlc -convert space.bmp environment1bmp.mdl"

Is the problem that the game won't load adevlbmp.mdl but it will load idevlbmp.mdl ? Or just that you noticed that all existing ones begin with i so you figure you should be consistent?

The "model" is just the word you need to use to make it work.

You make a text file called [name here]bmp.mdl

It contains

Code: Select all

use "model";

example = 
           ImportImageFromFile("artimage.png", true);
where artimage.png is the name of the image you want to use.
- Strangely enough, the example works. Dunno why, but it does.
- As for removing the number from the beginning - I changed it to TFC but it did the same...
- Although now that I look back, it might be that it couldn't handle upper case letters (tfcdevlbmp.mdl vs. TFCdevlbmp.mdl).
- As for the "i" at the beginning - I noticed that if it's not there, then ICE won't load the .mdl file as an icon for devels, so I put it there and it loaded them. Only later I noticed that just because ICE loads it, it doesn't mean that the game would load it too.

As for the other thing:

Oh, I think I get it now - the text file itself is then reffered to in the core?
-----------------------------------------------------------------------------------------------------------
Image
Link: Allegiance Stuff on "Jersy's Ultimate Blog of Concentrated Nerdiness"
Current stuff-count: 97
(Latest update: March 7th, 2011, in "Jers_Core Diary")

Stationed in CZECH REPUBLIC (link)
(GMT+1)
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

Yes. Instead of using an image bmp.mdl you are using a text bmp.mdl which tells allegiance where to look for the image (in whatever format you like - preferably .png)
Bunnywabbit
Posts: 965
Joined: Sun May 15, 2005 7:00 am
Location: Amsterdam, the Netherlands

Post by Bunnywabbit »

Also, this stuff is case sensitive; i should stick to all lowercase to avoid that entire dimension of typos.
ImageImage current version r158 new beta as of jan 23 2012
Your_Persona
Posts: 773
Joined: Sat Dec 04, 2004 8:00 am
Contact:

Post by Your_Persona »

-->>Elitism<<--
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
Post Reply