proc/IncludeFiles()
null<<'aniron.ttf'
ID:141789
Nov 10 2008, 3:33 pm
|
|
Ok so Ive been waiting for the new version of byond to update the font on my game and i even already had the file single quoted in. But it still isnt showing up for other players. The funny thing is when i take the file to a different computer that doesnt have the font installed but run it through Dream maker the font shows up but if i connect to it through a server from a computer that doesnt have the font it doesnt work. Heres how im putting it in my code not sure if theres a betting way to do this:
|
In response to Jeff8500
|
|
I get errors saying .ttf isnt a supported file type
|
Sounds like your server may simply not have the updated world files (specifically the RSC), so it doesn't have the font. Your post was kinda vague in what you've tried, but from what I understand you copied the source files to a different computer, that doesn't have the font installed, compiled and executed the DMB, and it worked correctly.
|
In response to Kaioken
|
|
yes, and i hosted with the newest compile as well, im trying something different today and ill see if it works
|
In response to Jeff8500
|
|
Your way seems a little strange too. :P Not that it compiles. >_>
To include a file of any type in the RSC you just need to use it between single quotes anywhere, and it'll be done. All you need to make sure is that it compiles; the section of that code doesn't even need to ever run. Hence, what his proc is doing with outputting to null, it's just a method of compiling a statement with the quoted file, since it won't compile with just the file. It's actually me who he got this method from in an older topic. <_< [link] |
In response to NightJumper88
|
|
If it doesn't work (and this is a kind of catch-all plan B solution, but it might work), try clean compiling and then updating the files on the server. If it still doesn't work, I'll see if I can actually get this feature to work myself - since it's a new one, it's possible it might be bugged and just not work or something (?).
|
It's possible there is actually a bug involved here. I did what I could to test the feature but there's a possibility a timing issue is being felt in the resource management; it's possible the resource is being installed only after the skin is initialized. On the whole this doesn't make too much sense to me because of the way single-quoted resources are handled, but I won't rule it out.
What you should do to confirm the problem is this: 1) Reboot your system; if a temp copy of the font is installed this will uninstall it so you're working with a clean slate. 2) Open up your BYOND cache folder and clear out everything. 3) Open your game and keep an eye on the cache folder. If aniron.ttf does not show up when the game starts, the problem is most likely your code. 4) If aniron.ttf does appear but you don't see it in your game, try opening up a paint program or word processor, and see if the font appears there. If it doesn't, there's some other issue going on, but if it does, then the game probably has a problem with timing the skin load. 5) If you see the font show up in that other program, then launch a second copy of your game while the first is still running, and see if that correctly shows the font--that will confirm a timing problem. Now all that aside, I would also try fiddling with your code. The DM compiler doesn't do a lot of optimization, but outputting to null may well be telling it to do away with that statement altogether. The way to tell for sure would be to look through your .rsc file to see if the font is there. If it's not, then I recommend sticking with the example code for including a font. var/list/fonts = list('aniron.ttf') Lummox JR |
In response to Lummox JR
|
|
I tested the method, it works for including files in the RSC. It seems it is accurate to say any usage at all of a file in single quotes <small>[that is valid in the sense it will compile]</small> will add the file.
|
In response to Lummox JR
|
|
Ok so I uninstall the font on my computer and rebooted i then changed how i had it coded in my file the way you had it. I then packaged the files and ran it on dream daemon and joined the server and the font wasnt there.
However if i just run it from Dream Maker the font is there and they work fine. |
In response to Lummox JR
|
|
I can confirm the same problem. The font works fine (and appears in the cache folder, though that copy is messed up, see below) when the DMB is executed with Dream Seeker and I access the world that way, but if I run a server and then connect into it, it uses the default font. And also, in this case it does not appear in the cache folder, but 2 garbled extensionless files do in its place, which don't appear if I run the DMB directly. Those are gone when I quit the world. They only appear if I fon't already have the font file in my cache (or my byond.rsc apparently). Their filenames are random, but are CRC-like; for example 73AD7586 and 2FB86444. Their size varies, sometimes 3 KB and sometimes 6 for example, though consistently smaller than the font file, although they contain similar contents - both the font file (produced when running the DMB directly) seem to store general resources and have my icons in them and as such (just like an RSC file). The font file produced in the cache folder when the font does work in game is not actually valid. If it helps any, you can take a look at those files from here.
I'd include more info, but I'm not sure what exactly could b needed, or if someone should just start a thread in Bug Reports instead anyway. >_> |
In response to Kaioken
|
|
Yeah thats a pretty good explanation of whats happening to me as well I guess we should put a post in bugs Ill check and if there isnt ill post one
|
The way you're including is rather strange to me. Either way, try that and see what happens.