Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: String file & table manager  (Read 5796 times)

0 Members and 1 Guest are viewing this topic.

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
String file & table manager
« on: June 08, 2007, 12:15:36 PM »

Hi,
     I have found an issue reagrding the string table manager and the string file it produces.

The issue is around the code in the game_daemon.script that handles the USE item WITH item mechanic.
The words USE and WITH are given an ID by the table manager but when you run the game using the string file containing these ID`s the ID is shown along with the text USE and WITH.

Example:

 // handle the standard foating caption
  if(Game.Interactive && ActObj!=null)
  {
    if (Game.SelectedItem==null)
    {
      WinCaption.X = Game.MouseX -10;
      WinCaption.Y = Game.MouseY + 40;
      WinCaption.TextAlign = TAL_CENTER;
      WinCaption.Text = ActObj.Caption;

      // keep the caption on screen
      WinCaption.SizeToFit();
      if(WinCaption.X + WinCaption.Width > Game.ScreenWidth) WinCaption.X = Game.ScreenWidth - WinCaption.Width;
      if(WinCaption.Y + WinCaption.Height > Game.ScreenHeight) WinCaption.Y = Game.ScreenHeight - WinCaption.Height;
     }
    // handle the caption when you want to use an object with another
    else {
      var Item = Game.SelectedItem;

      WinCaption.X = 0;
      WinCaption.Y = 0;
      WinCaption.Width = Game.ScreenWidth;
      WinCaption.TextAlign = TAL_CENTER;
      WinCaption.Text = "Use " + Item.Caption + " with " + ActObj.Caption;
    }
   
    if(CAPTIONS)
   {
   WinCaption.Visible = true;
    WinCaption.Focus();
  }
  }
  else WinCaption.Visible = false;



this becomes: -


 // handle the standard foating caption
  if(Game.Interactive && ActObj!=null)
  {
    if (Game.SelectedItem==null)
    {
      WinCaption.X = Game.MouseX -10;
      WinCaption.Y = Game.MouseY + 40;
      WinCaption.TextAlign = TAL_CENTER;
      WinCaption.Text = ActObj.Caption;

      // keep the caption on screen
      WinCaption.SizeToFit();
      if(WinCaption.X + WinCaption.Width > Game.ScreenWidth) WinCaption.X = Game.ScreenWidth - WinCaption.Width;
      if(WinCaption.Y + WinCaption.Height > Game.ScreenHeight) WinCaption.Y = Game.ScreenHeight - WinCaption.Height;
     }
    // handle the caption when you want to use an object with another
    else {
      var Item = Game.SelectedItem;

      WinCaption.X = 0;
      WinCaption.Y = 0;
      WinCaption.Width = Game.ScreenWidth;
      WinCaption.TextAlign = TAL_CENTER;
      WinCaption.Text = "/syseng0101/ Use " + Item.Caption + "/syseng0102/ with " + ActObj.Caption;
    }
   
    if(CAPTIONS)
   {
   WinCaption.Visible = true;
    WinCaption.Focus();
  }
  }
  else WinCaption.Visible = false;


In game, when using an item on an item you get - "/syseng01001/ Use ITEMA /syseng01002/ with ITEMB" appear as the text not "use ITEMA with ITEMB"

How can this be overcome as these words will need to be in the string file for localisation purposes
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: String file & table manager
« Reply #1 on: June 08, 2007, 01:26:04 PM »

WinCaption.Text = Game.ExpandString("/syseng0101/ Use") + Game.ExpandString("Item.Caption") + Game.ExpandString("/syseng0102/ with ") + Game.ExpandString("ActObj.Caption");
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: String file & table manager
« Reply #2 on: June 08, 2007, 02:00:46 PM »

Thanks but this now reads "Use Item.Caption with ActObj.Caption" hahahahahahha
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: String file & table manager
« Reply #3 on: June 08, 2007, 04:15:10 PM »

*sigh* you're not even trying to understand, are you? There are some extra quotation marks, it should look like this:

WinCaption.Text = Game.ExpandString("/syseng0101/ Use") + Game.ExpandString(Item.Caption) + Game.ExpandString("/syseng0102/ with ") + Game.ExpandString(ActObj.Caption);
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: String file & table manager
« Reply #4 on: June 08, 2007, 04:53:46 PM »

I know that hahahahhahaha I have changed it, it was a joke.............................sorry  >:D
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: String file & table manager
« Reply #5 on: June 08, 2007, 05:23:26 PM »

Mnemonic is obviously right, I was sort of blunt writing it, but something tells me, SBOVIS, that it wasn't joke. >:D
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: String file & table manager
« Reply #6 on: June 08, 2007, 05:25:42 PM »

Then why did I put HAHAHAHAHAHAHAHA at the end of my last post??? you lot need to get out more!!!  ::beer have a good weekend!!!
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: String file & table manager
« Reply #7 on: June 08, 2007, 05:45:22 PM »

sorry. my fault. I thought you're using hahahahaha instead of punctuation!
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet
 

Page created in 0.018 seconds with 20 queries.