Page 2 of 3
Posted: Sun Mar 13, 2011 10:31 pm
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.
Posted: Sun Mar 13, 2011 11:57 pm
by madpeople
does it work if you remove the number from the start of the file name?
Posted: Mon Mar 14, 2011 7:58 am
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 :-)
Posted: Mon Mar 14, 2011 10:37 am
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.
Posted: Mon Mar 14, 2011 11:07 am
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?
Posted: Mon Mar 14, 2011 11:10 am
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.
Posted: Mon Mar 14, 2011 11:17 am
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?
Posted: Mon Mar 14, 2011 12:30 pm
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)
Posted: Tue Mar 15, 2011 11:04 am
by Bunnywabbit
Also, this stuff is case sensitive; i should stick to all lowercase to avoid that entire dimension of typos.
Posted: Wed Mar 16, 2011 12:19 am
by Your_Persona