Build 244 changes that will affect mods
Max
Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
in Modding
We generally try pretty hard to make sure the API between game code and the engine remains backwards compatible whenever we make an update. However, in the upcoming Build 244 there are two changes where this is not true.
The first is we have removed support for TrueType fonts. TrueType fonts were something that we have been phasing out, and the need to support this secondary method of drawing fonts is problematic for our future plans. The only way to use a font now will be using the BMFont tool to generate a bitmapped font. If you are still trying to using TrueType fonts, an error message will be logged and the text won't appear.
The second is the way music cues are specified when calling Client.PlayMusic. In the past you would just specify the cue name. Now you need to specify the full path to the project where the cue is located such as Client.PlayMusic("sounds/NS2.fev/Main Menu") instead of Client.PlayMusic("Main Menu"). This change was part of building a simplified method for playing sounds without using the FMOD designer tool. In addition to the old method, you can now just directly play WAV files from disk.
The first is we have removed support for TrueType fonts. TrueType fonts were something that we have been phasing out, and the need to support this secondary method of drawing fonts is problematic for our future plans. The only way to use a font now will be using the BMFont tool to generate a bitmapped font. If you are still trying to using TrueType fonts, an error message will be logged and the text won't appear.
The second is the way music cues are specified when calling Client.PlayMusic. In the past you would just specify the cue name. Now you need to specify the full path to the project where the cue is located such as Client.PlayMusic("sounds/NS2.fev/Main Menu") instead of Client.PlayMusic("Main Menu"). This change was part of building a simplified method for playing sounds without using the FMOD designer tool. In addition to the old method, you can now just directly play WAV files from disk.
Comments
We don't talk about that build anymore...
You know... I always figured lemons grew in a bush or in the ground like potatoes pumpkins or strawberries, or something. Then i saw lemon trees in farmville 2 and thought maybe they had no idea what lemons grow on.. Then i read this post. And i think maybe it's true they do grow on trees after all, like apples and oranges I've never seen a lemon tree, not yet, but the day i do, i'll say to myself "thank you kamamura, you prepared me for this moment".
If this is going to be (or is) implemented, could you also add support for unicode in game? We (koreans) created a mod that replaces all bitmap fonts to TrueType fonts since current bitmap font system converts UTF-8 symbols to single-byte encoding. This causes Korean characters to be displayed incorrectly. After some extensive testing, we have found a workaround using TrueType font and began distributing to other Koreans last week.
This news just saddens us.
I know that there is a PT working on a new font now but I guess newly added characters do not go beyond those displayed here http://www.ascii-code.com/
we aren't using a modified TTF; we are actually using given TTF file Cablibri (for scoreboard) in the game to display korean characters by changing a few LUA codes. To be more specific, we can't directly use korean characters in chat box. Hence, the workaround is to change chat font from bitmap to TTF and pre-define a set of alphabets in korean translation file (koKR.txt) that translates into korean if typed in that order. Then, we search that specific order of alphabets in the chat message and replace them with Korean characters.
For example, in GUIChat.LUA
we redefined
then added
in addition, koKR.txt file has following set of alphabets defined,
so, writing "//dks sud gk tp dy" would return 안녕하세요 in game.
If you are asking for FNT file with .png that contains korean characters, I will make one over the weekend and post it here.
AGENCYFB.ttf - agencyfb.ttf file that I downloaded
AGENCYFB_KR.ttf - agencyfb.ttf with korean characters added by me
AgencyFB_medium.fnt - FNT file using AGENCYFB_KR.ttf using BMFont with provided configuration
AgencyFB_medium_0.png - png file for AgencyFB_medium.fnt
koKR.txt - Korean Translation file with pre-defined alphabet sets
I hope this helps
i want to change game menu music in my mod by this method, so if i understand correctly, i need MainMenu.lua and these lines:
/**
* Plays background music in the main menu. The music will be automatically stopped
* when the menu is left.
*/
function MenuMenu_PlayMusic(fileName)
if mainMenuMusic ~= nil then
Client.StopMusic(mainMenuMusic)
end
mainMenuMusic = fileName
if mainMenuMusic ~= nil then
Client.PlayMusic(mainMenuMusic)
end
end
also i have music file: ThirstyOnosCut.wav (or maybe i can use .mp3?), i need to put it at mymod\source\soundsrc right?
which lines in MainMenu.lua and how i should change with my music file name? somebody can show me an example please