TEMPLATE: 9-verb MI-style 1.6.4 - Last update: 4th April 2019

Started by abstauber, Thu 17/09/2009 16:16:37

Previous topic - Next topic

abstauber

There are two ways:

You can set character clickable in the editor.
or use

cEgo.clickable = true;

somewhere in the script.


cianty

I have a problem switching the sprites for the action gui buttons. Whenever I change the sprite it immediately "jumps" back to the original sprite. Does anyone have an idea what causes this?
ca. 70% completed

abstauber

Yep, I know ;)

Just changing the sprites in the AGS editor won't help, since the SetActionButtons function overwrites them immediately.
What you need to do as well is to look in the function AdjustLanguage() and change the sprite slots there too.

If you want to change the icons during runtime, you need to call SetActionButtons with the new sprites, followed by CheckDefaultAction().


That should do it.

cianty

Thanks a lot, Abstauber! I'll look into that tonight.

EDIT: Again, many thanks, Abstauber! It worked perfectly!
ca. 70% completed

poplamanopla

Hi everybody!

I've been writing the first draft for my adventure with details of the characters, objects, places, etc in my free time.

But now, when I´m gonna restart the proyect I have some problems with the engine ... again.

Specifically with dialogues.

I do not like that options dialogs begin with a number behind the text.

I want say like this:

1. Hello! I am who I phoned to you this morning.
2. Where I can buy a ticket to the show?
3. What can you tell me about "the man with the mustache"?
4. Goodbye.

I want it to look like this:

Hello! I am who I phoned to you this morning.
Where I can buy a ticket to the show?
What can you tell me about "the man with the mustache"?
Goodbye.

(without numbers)

I read "guiscript.asc", "GlobalScript.asc" (also ash files) and documentation and I can't found where is the code to change this.

By default in AGS the dialogs doesn't starts with a number so I suppose that its a kind code inside "9-verb MI-style" script.

For an other part, in ScummVM games when started the dialogs in the you can see the differents options while the characters are talking.

In "9-verb MI-style", when this ocurr the dialogs options are hided and show the last action and the button-verbs until the conversation ends.

I know that may be a bad explanation ... So I left some pictures for better understanding that I want to say ...

Thanks.






Ghost

With the numbers I can help- you can usually switch that off in General Settings- the option is "Number Dialog Options". Just set it to false.

If Abstauber did this numbering in-scipt, though...

abstauber

Quote from: Ghost on Wed 22/12/2010 19:33:21
If Abstauber did this numbering in-scipt, though...

Nope, the general settings are the ones to look at :)
Also there's an option to decide whether to show the GUIs during spoken dialog or to hide them. That would not be exactly what you're looking for but a start.

poplamanopla

 :)  :D  ;D  Yes! That's what I wanted.

I'm still amazed at the speed of our response.

The best program, the best template and the best users.

Many thanks Ghost and abstauber. You have gained a good place in the credits of the project.  ;)

I hope (I have faith) that next year could be ready the first chapter of the adventure.

Thanks again ... and Merry Christmas of course.

Unai

Here's the spanish translation,  I need some help to get a better translation, since I haven't tried the GUI.

What is "Default" for? Is it a verb? Or an adjective? Is it something like "Return to default values"?

Don't you also need translation for the verbs? like "Give X to Y" and such?


Code: ags

// Spanish
    OptionsTitle.Text   = "Opciones";
    OptionsMusic.Text   = "Volumen de la música";
    OptionsSound.Text   = "Efectos de sonido ";
    OptionsSpeed.Text   = "Velocidad de juego";
    OptionsDefault.Text = "Valores por defecto";
    OptionsSave.Text    = "Guardar";
    OptionsLoad.Text    = "Cargar";
    OptionsRestart.Text = "Reiniciar";
    OptionsQuit.Text    = "Salir";
    OptionsPlay.Text    = "Volver";
    gPausedText.Text    = "Juego en pausa. Pulsa Espacio para continuar";
    RestoreTitle.Text   = "Por favor, elige el juego a cargar";
    RestoreCancel.Text  = "Cancelar";
    SaveTitle.Text      = "Por favor, introduce un nombre";
    SaveOK.Text         = "Guardar";
    SaveCancel.Text     = "Cancelar";
    gConfirmexitText.Text = "¿Seguro que quieres salir? (S/N)";
    gRestartText.Text   = "¿Seguro que quieres reiniciar? (S/N)";
I am a deeply superficial person

Monsieur OUXX

Ooops completely forgot about that.
Or did I send you my work in progress, abstauber? I can't remember.
 

abstauber

@Unai:

Thanks for your help. I already have the verbs from josemarg, so now only the verb translation is open, which I completely forgot.

Code: ags

       if (action == eMA_WalkTo)   tresult="Go to %s";
  else if (action == eGA_LookAt)   tresult="Look at %s";
  else if (action == eGA_TalkTo)   tresult="Talk to %s";
  else if (action == eGA_GiveTo) {
    if (item.Length>0)             tresult="Give !s to %s";
    else                           tresult="Give %s";
  }
  else if (action == eGA_PickUp)   tresult="Pick up %s";
  else if (action == eGA_Use) {
    if (item.Length>0)             tresult="Use !s with %s";
    else                           tresult="Use %s";
  }
  else if (action == eGA_Open)     tresult="Open %s";
  else if (action == eGA_Close)    tresult="Close %s";
  else if (action == eGA_Push)     tresult="Push %s";
  else if (action == eGA_Pull)     tresult="Pull %s";
  else tresult=" ";



@Monsieur OUXX
Nope, nothing here yet. But it would still be cool if you could send me something ;)

Unai

Hey, could you answer the Default question? :D

QuoteWhat is "Default" for? Is it a verb? Or an adjective? Is it something like "Return to default values"?

The other code

Code: ags

       if (action == eMA_WalkTo)   tresult="Ir a %s";
  else if (action == eGA_LookAt)   tresult="Mirar %s";
  else if (action == eGA_TalkTo)   tresult="Hablar con %s";
  else if (action == eGA_GiveTo) {
    if (item.Length>0)             tresult="Dar !s a %s";
    else                           tresult="Dar %s";
  }
  else if (action == eGA_PickUp)   tresult="Coger %s";
  else if (action == eGA_Use) {
    if (item.Length>0)             tresult="Usar !s con %s";
    else                           tresult="Usar %s";
  }
  else if (action == eGA_Open)     tresult="Abrir %s";
  else if (action == eGA_Close)    tresult="Cerrar %s";
  else if (action == eGA_Push)     tresult="Empujar %s";
  else if (action == eGA_Pull)     tresult="Estirar de %s";
  else tresult=" ";



I saw josemarg used Estirar instead of Tirar like Lucasarts games did. Good choice, Tirar means both Pull and Throw in spanish and I remember having Indy trying to throw every object in the game until suddenly... he pulled a bookshelf :D
I am a deeply superficial person

abstauber

Argh, sorry - those things happen when you surf with more browser tabs than your conscience can manage :)

"OptionsDefault.Text" is the caption of the button which resets gamespeed, music and sound volume to the default values.



Unai

Ok, I edited my original post with that, "Valores por defecto" which means Default values

Is it too long?
I am a deeply superficial person

Giowe

hi, first of all i wanna help poplamanopla cause i had his same probelm. if u don't want the actions window when u are talking to someone, the only method that i discovered is to put at the beginning of the every dialogs command  "disable_gui();" and at the end of the dialog the command  "enable_gui();".

now i have a question:
to set this template more similar to monkey island style i need to modify one little thing but i don't know well the way i can do that:

what i need:
in monkey island 1 or 2, when you press the LEFT mouse button on  an invetory object, the game runs as default-action the look_at action, and the action_bar report as default the action "look at xxx".  the same does if you press the RIGHT mouse button.

in this template, if you press the right mouse button, you have the monky-island-style look_at action on you inventory item but if you see the action bar that said "use xxx", and if you press the left button of the mouse you automaticly USE the object that you have in you inventory. i want that the only way to use object form inventory will be by clicking the action "use" from the actions menu.
what how i have to modify to set this template = to monkey island ?

looking at the code i think that the modify is to do at row 1254 of guiscript.asc... i post the rows of code that i think that may change..

//left click in inventory
    else if (button==eMouseLeftInv) {
      if (!isAction(eGA_GiveTo))ItemGiven= null;
   
      if (GlobalCondition (1)) {
        // if the mouse is in the inventory and modes Walk or pickup are selected
        SetAction (eGA_Use);
        location=GSinvloc;   
        if (Extension()=='u' && ii.IsInteractionAvailable(eModeInteract)) {
          // use it immediately (not with anything else)
          used_action=global_action;
          ii.RunInteraction(eModeInteract);
          SetAction(eMA_Default);
        }
        else
          player.ActiveInventory=ii;
      }
      else  if (GlobalCondition (2) == 1) {
        // if the mode is useinv and the mouse is over the active inv (like "use knife on knife")
        // so do nothing again
      }
      else {
        used_action=global_action;
        if (Mouse.Mode==eModeInteract) {
          if (isAction(eGA_Use) && ii.IsInteractionAvailable(eModeInteract)) {
            ActionLine.TextColor=ActionLabelColorHighlighted;
            ii.RunInteraction(eModeInteract);
            SetAction(eMA_Default);
          }
          else player.ActiveInventory=ii;
        }
        else {
          if ( (Mouse.Mode >0 && Mouse.Mode <10 )&& ii != null) {
                GSagsusedmode=Mouse.Mode;
                ActionLine.TextColor=ActionLabelColorHighlighted;
                ii.RunInteraction(Mouse.Mode);
                SetAction(eMA_Default);
          }
        }
      }
    }

poplamanopla

#76
Hi folks!

First of all, thanks for the help, Giowe. ;)

I'm redesigning completely the graphics of my game (well, future game) and I don't have all the time as I would like for do more things.

I Still do not know if I will continue using this wonderful template because finally may be not appropriate for the game that I want to make ... meanwhile I will continue using it.  ;D

I think that will be useful replace "action=eGA_Use" by "action=eGA_LookAt" at the line 387 (in guiscript.asc) to make that the default text in the action Bar is "look at" .

To use by default action "look at" when click left buttom mouse ... mmmm ... Sorry, I'm on it  :-[  I hope to have more time the next weeks to look at it and answer you, but probably you have to change "conditions" and "actions" in "Global Condition" section (line 224).

Abstauber could you help better.


Monsieur OUXX

Quote from: abstauber on Fri 14/01/2011 15:21:36
@Monsieur OUXX
Nope, nothing here yet. But it would still be cool if you could send me something ;)

Will do.
I got interrupted by Christmas holidays, and now I don't have photoshop anymore.... Which is a major obstacle :D I'll find a way.
 

abstauber

@Unai:
Way too long, one button can only hold up to 9 characters ;)
Maybe you could fire up an old scumm game (native, not ScummVM) and check how they translated it.

@Giowe
As poplamanopla said, first edit line 387 and replace "action=eGA_Use" with "action=eGA_LookAt"

Now in the codeblock you've posted, edit the last else-block in this if-clause:

Code: ags

    //left click in inventory
    else if (button==eMouseLeftInv) {
      if (!isAction(eGA_GiveTo))ItemGiven= null;
   
      if (GlobalCondition (1)) {
        // if the mouse is in the inventory and modes Walk or pickup are selected
        SetAction (eGA_Use);
        location=GSinvloc;    
        if (Extension()=='u' && ii.IsInteractionAvailable(eModeInteract)) {
          // use it immediately (not with anything else)
          used_action=global_action;
          ii.RunInteraction(eModeInteract);
          SetAction(eMA_Default);
        }
///// HERE'S THE CHANGE ///// 
        else 
        {
          SetAction (eGA_LookAt);
          used_action=global_action;
          ii.RunInteraction(eModeLookat);   
          SetAction(eMA_Default);
          //player.ActiveInventory=ii;
        }
///// HERE'S THE CHANGE ///// 
      } 


So in detail, the line
Code: ags
player.ActiveInventory=ii;

is changed to

Code: ags

        else 
        {
          SetAction (eGA_LookAt);
          used_action=global_action;
          ii.RunInteraction(eModeLookat);   
          SetAction(eMA_Default);
          //player.ActiveInventory=ii;
        }

(don't forget the braces)

With this change you can still use the "use-extension" for inventory items, like the magic  envelope when Guybrush gets arrested on Phatt Island.

@Monsieur OUXX:
Don't worry, I've got all day :)

Unai

Quote from: abstauber on Mon 17/01/2011 13:12:37
@Unai:
Way too long, one button can only hold up to 9 characters ;)
Maybe you could fire up an old scumm game (native, not ScummVM) and check how they translated it.

Ok, so what about "Restaurar"? It means Restore, i think it's pretty self explanatory :D

Extra question:
I haven't tried the template yet, and maybe is somehow clear when I open it in AGS, but... what size do the backgrounds need to be to use your GUI? From screenshots it looks like 139px for a 320px resolution, but the number is a bit weird...
I am a deeply superficial person

SMF spam blocked by CleanTalk