Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: entity specific fonts  (Read 4664 times)

0 Members and 1 Guest are viewing this topic.

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
entity specific fonts
« on: August 16, 2006, 08:38:44 PM »

Good evening. We tried to define a separate font type for a entity. In this case: When the cursor rolls over the entity a text with another font type shall be load (black text on black ground isn't that good
« Last Edit: August 16, 2006, 09:45:58 PM by Amo »
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: entity specific fonts
« Reply #1 on: August 16, 2006, 09:45:04 PM »

Are you using the default game_daemon.script for the caption displaying?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: entity specific fonts
« Reply #2 on: August 16, 2006, 09:47:03 PM »

Yes it is still standard.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: entity specific fonts
« Reply #3 on: August 17, 2006, 07:15:37 AM »

For example, to inherit the font assigned to the entity in SceneEdit, you'd have to do the following:

Edit game_daemon.script, find the line:

WinCaption.Text = ActObj.Caption;

and add this:

WinCaption.Text = ActObj.Caption;
WinCaption.SetFont(ActObj.GetFont());
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: entity specific fonts
« Reply #4 on: August 17, 2006, 09:38:41 AM »

Thank you works fine!

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: entity specific fonts
« Reply #5 on: August 17, 2006, 09:58:50 AM »

OK, I need to correct myself. It works only fine in debugging mode, after compiling the game we get script errors in main menu. In the game itself it works fine.

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: entity specific fonts
« Reply #6 on: August 17, 2006, 11:11:35 AM »

Please, whenever there is a problem post the errors from the log files.
Logged
fl*p

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: entity specific fonts
« Reply #7 on: August 17, 2006, 12:30:43 PM »

Ok, here we go:

WME Log:


13:27: ********** DEBUG LOG OPENED 17-08-2006 (Release Build) *****************
13:27: Wintermute Engine ver 1.6.1, Compiled on May 20 2006, 16:55:09
13:27: Platform: Windows XP Service Pack 2 (Build 2600)
13:27: DirectX version: 9.0
13:27: BugslayerUtil.dll is bound
13:27:
13:27: Scanning packages...
13:27:   Registered 0 files in 0 package(s)
13:27: Initializing scripting engine...
13:27:   Script compiler 'dcscomp.dll' bound successfuly
13:27: Loading plugins...
13:27:   wme_sample_pixel.dll
13:27:   wme_snow.dll
13:27: Loading string table...
13:27:   42 strings loaded
13:27: Enumerating Direct3D devices...
13:27: Enumerating DirectSound devices...
13:27: Available video devices:
13:27:   NVIDIA GeForce 6600 GT  (accelerated)
13:27:     nv4_disp.dll 6.14.10.7189
13:27:   NVIDIA GeForce 6600 GT  (accelerated)
13:27:     nv4_disp.dll 6.14.10.7189
13:27: Available audio devices:
13:27:   Primärer Soundtreiber
13:27:   Creative Sound Blaster-PCI
13:27:   [no sound]
13:27:
13:27: User selected:
13:27:   Video: NVIDIA GeForce 6600 GT  (accelerated)
13:27:          Windowed:no  Colors:32bit  T&L:no  Multisample:4
13:27:   Audio: Primärer Soundtreiber
13:27: Maximum texture size: 4096x4096
13:27: Engine initialized in 547 ms
13:27:
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27:   Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28:   Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28:
13:28: Shutting down...
13:28: Shutting down scripting engine
13:28: ********** DEBUG LOG CLOSED ********************************************

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: entity specific fonts
« Reply #8 on: August 17, 2006, 02:00:13 PM »

Ok, change the line to:

if(ActObj.Type=="entity") WinCaption.SetFont(ActObj.GetFont());

That should do the trick.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Amo

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 206
    • View Profile
    • Sunrise The Game
Re: entity specific fonts
« Reply #9 on: August 17, 2006, 02:47:49 PM »

That should do the trick.

And it does the trick. Thank you.
 

Page created in 0.055 seconds with 21 queries.