Adventure Game Studio | Forums

AGS Support => Modules & Plugins => Topic started by: abstauber on 17 Sep 2009, 16:16

Title: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 17 Sep 2009, 16:16
If you are starting a new project, please consider using the succesor of this template over here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=54762.0


Abstract:
  This template adds a 9 Verb GUI to AGS, 
  similar to the ones in classic LucasArts Games.
  The graphics included may be freely used and altered in any way.

Version: 1.6.3

Authors:
   Proskrito - first release
   Lazarus - rewritten for AGS 2.7
   SSH - rewritten for AGS 2.71 and AGS 2.72
   Rulaman - Maniac Mansion Starterpacks
   Lucasfan - Maniac Mansion Starterpacks
   KhrisMUC - AGS 3.0 conversion
   Electroshokker - doubleclick code

   Abstauber      current maintainer


Dependencies:
  AGS 3.1 SP2 or later
  custom dialog rendering supported in AGS 3.2 or later

Screenshot
(http://shatten.sonores.de/wp-content/uploads/2009/09/scumm.PNG)

Downloads
Compiled with AGS 3.4.1 P2
(scripts are compatible with AGS 3.2 and later)
http://shatten.sonores.de/wp-content/uploads/2018/06/9-verb-MI-style_163.zip

Github repository:
https://github.com/dkrey/ags_9verb-template

GUI-Graphics and Documentation
http://shatten.sonores.de/wp-content/uploads/2014/10/9verb_addon.zip

AGS 3.1 SP2 (not updated anymore, but the script is backwards compatible)
http://shatten.sonores.de/wp-content/uploads/2011/02/9verb_13_AGS31.zip


Revision History
... for the complete changelog, have a look at guiscript.ash
1.5    support for AGS 3.4
       added custom dialog rendering
       adapted eDirection to enum CharacterDirection (and removed eDir_none)
       fixed talk-to and pickup interactions on inv items
1.5.1  switched to 32-bit and D3D9 by default
        exit rooms via doubleclick now works on objects
        option to hide the main gui during dialogs
1.5.2  bugfix regarding inventory using keyboard shortcuts
         added option disable the doubleclick entirely
1.5.3  added (optional) talk-to for objects and hotspots
1.5.4  fixed label description
       Selected action is restored after unpausing
1.6    added running option
        removed invisble mouse cursors
        slight code cleanup
        removed obsolete dialog gui
1.6.1  added dutch translation
       fixed runnnig bug in scrolling rooms
1.6.2  More touchups on running mode
       minor bugfixes

1.6.3  Bugfix regarding roomclicks when gui is disabled

Have fun :D

Translations

Spanish - Josemarg, Unai, Poplamanopla
German  - Abstauber
French  - Monsieur OUXX
Italian - Paolo
Portuguese - Miguel
Dutch   - arj0n

If your language has not been added yet and you would like to help out: feel free to send us a PM or post in this thread
Title: Re: TEMPLATE: Scumm 9-Verbs GUI for AGS 3.2 (beta)
Post by: Pumaman on 21 Sep 2009, 21:57
Excellent! :)

If this template proves to be stable, would you be happy with it being included in AGS 3.2?
Title: Re: TEMPLATE: Scumm 9-Verbs GUI for AGS 3.2 (beta)
Post by: abstauber on 22 Sep 2009, 15:08
Sure, go ahead :)
Although the GUI is not foolproof, I think I could answer most questions/problems related to it.

As for the stability, everything appears pretty solid - I'm using it in my project for quite a while now.
But I'm sure, more people like to test it, after the documentation is ready.

Right now I'm about to describe all of its functions (25 done, 22 more to come), after I'm done with that, I'm thinking about a tutorial.
Title: Re: TEMPLATE: Scumm 9-Verbs GUI for AGS 3.2 (beta)
Post by: abstauber on 30 Sep 2009, 13:56
*bump*

I've finally managed to create a manual for this template.
Now, could anyone of you native speakers please proof read it? I'm afraid, it's still full of spelling and grammar mistakes. The file is included inside the zip.

I've also removed the old and possibly copyrighted graphics and replaced them with my own work. So now it's safe to distribute this template with upcoming AGS releases.

Any thoughts?
Title: Re: TEMPLATE: Scumm 9 Verb GUI for AGS 3.2 (beta)
Post by: Pumaman on 04 Oct 2009, 16:36
Good work!

I've given it a quick test and all seems to be well. I've made some minor tweaks to the script code and General Settings in the version that's included in 3.2 RC 1, so please could you continue any further work based on that.

As for the documentation -- where can we find it? Is it the "9verbs.odt" file in the zip, and if so how do you open an ODT file?
Title: Re: TEMPLATE: Scumm 9 Verb GUI for AGS 3.2 (beta)
Post by: abstauber on 04 Oct 2009, 17:02
Awesome :D
Thanks for crawling through the code, I'll gladly base my work on your tweaked version!

Yep, the .odt file is the documentation, I've used OpenOffice 3.1 to create it. It's completely based on style sheets, so converting it to HTML should not be too much work. Converting it to .doc on the other hand might break these sheets.

Title: Re: TEMPLATE: Scumm 9 Verb GUI for AGS 3.2 (beta)
Post by: Pumaman on 14 Oct 2009, 22:16
Yep, an HTML version would be useful, saves people having to install OpenOffice just to read the docs :)
Title: Re: TEMPLATE: Scumm 9 Verb GUI for AGS 3.2 (beta)
Post by: abstauber on 15 Oct 2009, 09:00
Alright, I've exported the docs as pdf and html. I've also updated the template with your tweaks.

btw. could anyone please move this to the modules/plugin section?
Title: Re: TEMPLATE: Scumm 9 Verb GUI for AGS 3.2 (beta)
Post by: Gilbert on 15 Oct 2009, 09:20
Actually I originally decided to move this until the (beta) word is dropped, but after CJ put this into the official AGS package I decided not to move this thread there.
But now I think again. Even that it's not meant to be obtained separately it certainly should better be there for feedbacks.

So, thread moved, and subject line updated. :)
Title: Re: TEMPLATE: Scumm 9 Verb GUI (Included with AGS V3.2+)
Post by: Magnusfuhr on 03 Nov 2009, 09:56
Hi all.
My name is Magnus. I´m from Denmark, where i study on the danish Art Academy.
 I´m working on a Art adventure game, how to become a great artist and so on. I found the 9 verb GUI and it fits perfect to the concept. However i need to translate it from 320x200 to 1024x768. Have someone any experience on that?

Thanks for an fantastic program and site.

Don´t hope that this is OT. sry if it is... I´m new... :)
Title: Re: TEMPLATE: Scumm 9 Verb GUI (Included with AGS V3.2+)
Post by: abstauber on 09 Nov 2009, 08:22
Sorry for having spotted your reply so late.

Well of course it's possible to use this GUI in any resolution, and converting it is quite easy. But if this is really going to be your first project in AGS, I'd rather start with something small and simple ;)

If you have already finished a Test-Quest and are still having trouble to use the GUI in 1024x768, I'd be glad to help.
Title: Re: TEMPLATE: 9-verb MI-style: updated 09/01/18 (Included with AGS V3.2+)
Post by: abstauber on 19 Jan 2010, 13:07
Hi everyone!
I've done some changes to the template. In case any of you is already using it, here's the changelog:

* included proskrito's exit extension, added functions: ExtensionEx, GoTo, Go, WalkOffScreen
* removed the obsolete GUI gMessages
* added doubleclick functionality for exits and open doors (doubleclick skips walking)
* Options GUI featuring the new SetAudioTypeVolume function
* minor tweaks
* added a second room to the template to demonstrate the exit extension

There are still two features missing from Proskrito's template: Map screens and a mechanism to walk/don't walk to hotspots.

Would anyone like to see this or do you think this would just bloat the template?
Title: Re: TEMPLATE: 9-verb MI-style: updated 09/01/18 (Included with AGS V3.2+)
Post by: skerrigan on 12 Feb 2010, 14:49
How easily is this adapted to a higher resolution AGS game? The new AGS supports 1024x768 resolution doesn't it?
Title: Re: TEMPLATE: 9-verb MI-style: updated 09/01/18 (Included with AGS V3.2+)
Post by: BlueAngel on 14 Feb 2010, 09:33
How easily is this adapted to a higher resolution AGS game? The new AGS supports 1024x768 resolution doesn't it?

If you get it adapted to 800X600 would you send me a msg, please.  ;)
I cant do it myself and a error pop up if you just resize it
Error running function 'game_start'
I think the text length is wrong but dont know how to change it.
Code: Adventure Game Studio
  1. String clearToSpace(String text) {
  2.   int p=0;
  3.   // ignore white spaces at the beginning
  4.   while (p<text.Length && text.Chars[p]==' ') {
  5.    p++;
  6.   }
  7.   // write white spaces until next white space
  8.   while (p<text.Length && text.Chars[p]!=' ') {
  9.    text=text.ReplaceCharAt(p, ' ');
  10.    p++;
  11.   }
  12.   return text;
  13. }
Title: Re: TEMPLATE: 9-verb MI-style: updated 09/01/18 (Included with AGS V3.2+)
Post by: abstauber on 14 Feb 2010, 09:59
Whoops, I didn't know that this might be a problem. I'll take a look at it this evening and keep you updated.
Title: Re: TEMPLATE: 9-verb MI-style: updated 09/01/18 (Included with AGS V3.2+)
Post by: abstauber on 15 Feb 2010, 13:30
Okay, found it :)

If you don't want to upgrade your template, you can also update the script yourself.

Go to line 410 in guiscript.asc

change these lines:
Code: Adventure Game Studio
  1.   if (System.ScreenWidth==320)
  2.     font_info=GetTranslation("font_320: 1  0  0  0  0  0  0  0  3  0  0  0  0  0  0  0  0  0  3  3");
  3.   else if (System.ScreenWidth==640)
  4.     font_info=GetTranslation("font_640: 1  0  0  0  0  0  0  0  3  0  0  0  0  0  0  0  0  0  3  3");
  5.  

to this
Code: Adventure Game Studio
  1.   if (System.ScreenWidth==320)
  2.     font_info=GetTranslation("font_lowres: 1  0  0  0  0  0  0  0  3  0  0  0  0  0  0  0  0  0  3  3");
  3.   else
  4.     font_info=GetTranslation("font_hires: 1  0  0  0  0  0  0  0  3  0  0  0  0  0  0  0  0  0  3  3");
  5.  

I'll update the template asap.

@BlueAngel
The function is fine, but as you might see, the template defines a string called "font_info".
But it only does it for a screenwidth of 320 or 640.
So when you tried 800x600 or 1024 the variable "font_info" wasn't even created, so you got a null pointer error.
Title: Re: TEMPLATE: 9-verb MI-style: updated 10/02/15 (Included with AGS V3.2+)
Post by: BlueAngel on 15 Feb 2010, 13:48
 :D
Thanks for looking into this , I will try it as soon as I get home!
I did actually find that line but because I so bad at scripting i had no idea how to change it.
Tho it feels fine knowing that I was on the right way.  ;)
Thank you so much again!!!
Title: Re: TEMPLATE: 9-verb MI-style: updated 10/02/21 (now with AGS 3.1 support!)
Post by: abstauber on 23 Feb 2010, 09:39
Okay, I've given in and added AGS 3.1 support. So now nobody is forced to use the release candidate of AGS 3.2 anymore (although it's great and pretty stable).

The first post has been updated with the link.

@Blue Angel
Seems like it worked for you ;)

Title: Re: TEMPLATE: 9-verb MI-style: updated 10/02/21 (now with AGS 3.1 support!)
Post by: TheRoger on 07 Mar 2010, 14:15
Where I can add character animation script "cEgo.Animate(2, 2 , eOnce, eBlock, eForwards);, when using doors? I tried before "(any_click_on_door_special(0, oDoor.ID, 640, 420, eDir_Right, 2, 180, 88, eDir_Right, 0, 0, 4, 0)==0) Unhandled();
}" this, but this works with every click like look at, but I want that this would be used only when open and close doors.
Title: Re: TEMPLATE: 9-verb MI-style: updated 10/03/10 (now with AGS 3.1 support!)
Post by: abstauber on 08 Mar 2010, 07:36
Well you could do it like this:

Code: Adventure Game Studio
  1.   if (UsedAction(eGA_Open) || UsedAction(eGA_Close))
  2.   {
  3.     if (MovePlayer(640, 420)!=0) cEgo.Animate(2, 2 , eOnce, eBlock, eForwards);
  4.   }
  5.   if (any_click_on_door_special(0, oDoor.ID, 640, 420, eDir_Right, 2, 180, 88, eDir_Right, 0, 0, 4, 0)==0) Unhandled();
  6.  

But this way you would always have to add some lines of code before the actual door script which would undo the benifit of it.
So including the animation inside the function "any_click_on_door_special" itself might be an option as well.


Edit:

I've just updated the template to v1.2:
The included fonts now work in high-res games as well and I moved the options from the header to the script file (thanks to Monkey's coding lessons ;) )

So if you're looking for the options, they're now in guiscript.asc.
Title: Re: TEMPLATE: 9-verb MI-style: updated 10/03/10 (now with AGS 3.1 support!)
Post by: Fnord on 24 Mar 2010, 03:19
I'm loving this Template, and I really appreciate that you took the time to upgrade it to the newer AGS versions.

But, I have a question.

I kinda got lost with the code, and I couldn't find about this on the documentation PDF so I'll just ask.

Is there a way to force the Use verb to work as "Use xxx with" instead of just using the object for certain objects?
And also the other way around (forcing a left click to just directly use the object instead of "use with"?)

Anyhow, thanks for taking the time to updating it.
Title: Re: TEMPLATE: 9-verb MI-style: updated 10/03/10 (now with AGS 3.1 support!)
Post by: abstauber on 25 Mar 2010, 08:49
Great that you find it useful :)

I hope I get you right:

In order to disable "use with" or in other words force use, you have to add the use extension to item's description. If you look at the item iEnvClose from the test room, you can see it there.

In order to enable "use with" you simply remove the extension, like in the item iKey.
This way you still have the "use" verb active. So single click on the item directly brings you to "use with" and using the verb directly uses the item. Although I can' really suggest this, as nobody would expect that click the verb does something different than simply clicking the item.

Now if you want to force use with you have to get rid of the extension and clear the function from the event "Interact inventory item".
That way, it's always "use with". No matter if you directly click or use the verb.

I hope that helps.

-----edit:
I've updated the manual and fixed a few bugs. Please enjoy v.1.2.1 :)
Title: Re: TEMPLATE: 9-verb MI-style: updated 10/03/25 (now with AGS 3.1 support!)
Post by: Fnord on 25 Mar 2010, 14:56
Thanks a lot.

I actually like it better the way it's set by default, (clicking on the item for use with and clicking on the use button to just use the item,) but I want my actual project to be more straight forward on wether the item can be combined or not.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 09 Aug 2010, 11:13
First off I'd like to thank you for providing this excellent template! I have started working on my own game a few days ago and I am addiceted since. And this template is just perfect!

However, I now have one problem and I figured it would be best to post it in this thread.

I have created a new Character and a new View for it. Everything works fine except for one thing: Now when I click on "Pick Up" the mouse cursor becomes Loop 0 of the new View. It only happens when clicking "Pick Up" and the cursor goes back to normal when I am in another mode (e.g. go to).

The new View is "7: VRAT" and I don't think I touched "6: Cursor". How come the Pick Up option and my View 7 are connected?

Any help would be much appreciated!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 17 Aug 2010, 11:41
Are you sure you haven't mixed up cursor modes and views?

I tried to reproduce this, but I even didn't manage to get a view 7 ;) The first view I try to create in a blank template gets no. 17.

The cursor mode 7 is used for the wait cursor and contains a blank sprite. Every time a blocking event is triggered, the mouse cursor switches to "wait". After the event is over, the mode gets changed back.

Or could it be that the sprite slots have changed in guiscript.asc? (line 14 and 15).

You can also send me your game so I can take a look at it.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 17 Aug 2010, 13:42
Argh! :)

Thanks for your help! I just found out what was the problem: The Mouse Cursor for "Pick Up" was using View 7 while all other cursors use View 6 (the correct one).

The problem is indeed in the template. There are six Views included in the template but the Pick Up Cursor Mode refers to View 7 (which doesn't exist). So the Pick Up cursor will automatically become the first new View the user creates (because that one will be View 7). You have to change the 7 to 6 in the Pick Up mode of the template.

I'm glad this is corrected now, plus I finally had a look at the cursor modes. :)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 17 Sep 2010, 08:57
So, anyone else using this template? I am really happy with it. :)
Has the view been fixed as I posted above?

What I didn't like, though, was the black background during dialogs. I didn't find it fitting the rest of the interface. So I made this background instead (based on the gui style):

(http://i25.servimg.com/u/f25/11/75/59/84/dialog10.png) (http://www.servimg.com/image_preview.php?i=710&u=11755984)


Here's a screenshot of it in action (yay, that's my current game):

(http://i25.servimg.com/u/f25/11/75/59/84/stairs10.png) (http://www.servimg.com/image_preview.php?i=711&u=11755984)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 17 Sep 2010, 11:18
So, anyone else using this template? I am really happy with it. :)
Has the view been fixed as I posted above?
Quote

Well, I still don't see a problem. In my template all cursors utilise view 100, including the pickup cursor. Also creating a new game from the template doesn't break the view numbers.


What I didn't like, though, was the black background during dialogs. I didn't find it fitting the rest of the interface. So I made this background instead
Nice! The only thing bugging me is the outer frame (at least right / left / bottom). But it really looks better that way. I shall include it :)

yay, that's my current game
Yay :D
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 17 Sep 2010, 12:44
I just test-created a new game in AGS (3.2) and the views used are indeed different ones (View 100). In the version I used the cursors modes used View 6/7. So just forget what I said....  ::)

Dialog gui: The bottom border is like the normal GUI - the problem is the top, though: You'll notice the outer border missing there. That is because I don't know how to move the text options down a few pixels (3 or so). I guess anyone more adept could fix that so an improved background image could be used, with intact top border. I also had to adjust the left alignment by 3 pixels so that the numbers would be inside the boxes and not on the left borders (what I did was use a fully transparent image with width 3px as bullet icons. Again, this is more of a workaround than anything sophisticated).
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Armageddon on 17 Sep 2010, 21:15
Could you make a download just for the gui and the functions? No Bman or rooms or anything, just the 9-verb panel? I'm trying to remove everything but the basic controls and it keeps giving me errors, and I'm not much of a coder... :-[
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 28 Sep 2010, 08:46
@Armageddon
Whoops, sorry. I somehow forgot to reply.

Do you (and possibly others) still need a completely blank template?
And as a word of advice: I've you're completely new with AGS, you might want to start with the common Sierra style GUI first.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 28 Sep 2010, 09:52
I am new to AGS, I do use this template and I am thankful that it was not empty. I can see how some people may wish there was less in there... maybe strip it down to one room and put things like player.ChangeRoom in comments? If I had to choose between the availability of either an empty tempalte or one with two rooms and the characters I'll definately pick the latter.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 28 Sep 2010, 11:40
Well, the first version only had one room. But then I've added the exit hotspot feature, so I needed a second room to show it.

I'm glad that my concept of two demo/tutorial/showcase rooms works out :)
But I can understand that it's annoying to remove Roger and Beman everytime you starts over a new game. Another option would be to provide an empty game template as well - which would not compile and therefore scare off potential users.

Hmm.. at least I'm used to remove Roger from the standard and the scumm template :) I even thought about adding ProgZ' awesome revisited Roger sprites.

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 28 Sep 2010, 15:18
I even thought about adding ProgZ' awesome revisited Roger sprites.

Where can they be found? Currently I base all my characters on the Roger from the template (and then on the new sprites etc).
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 28 Sep 2010, 15:29
I even thought about adding ProgZ' awesome revisited Roger sprites.

Where can they be found? Currently I base all my characters on the Roger from the template (and then on the new sprites etc).

Why, seriously?!
This can be helped :) All awesomeness is stored here:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27959.0
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Gilbert on 28 Sep 2010, 15:32
Prog's roger is no match for CJ's talent.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 28 Sep 2010, 18:19
Nooooo! They're beautiful!
But it's too late... I already based a couple of animations on the original CJ sprites. But that's something for the sequel...
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Dualnames on 02 Oct 2010, 13:27
Abstauber what a great find. :D Roger never looked so cool. ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 02 Oct 2010, 19:43
Hehe, maybe we should move the upcoming Roger discussion to a new thread. I can  almost hear the keychain moving over from the "Games In Progress" board :D
Title: When left mouse buttom it's clicked no there are default accion with objects
Post by: poplamanopla on 10 Oct 2010, 10:21
Hi, I'm noob spanish guy.

I'm using this wonderfull template to create my first adventure game but I miss the default accion from the left button of mouse when is clicked.

I mean to accion "Go to" when put mouse over an object.

In LucasArt games with SCUMM GUI like Monkey Island, Sam & Max or Indianda Jones and the fate of atlantis when any verb are not selected and mouse is over an object the default accion is "Go to".

So if I click on the left button the character goes to object.

This not happen in template.  :'(

If the mouse it's over an object when clicking left mouse button do nothing.

Anybody can help me to fix this?

(I hope what understand me. My english isn't too good)

Thanks
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 10 Oct 2010, 12:42
Left-clicking on a hotspot does cause the character to go to the object if the hotspot has a WalkToPoint other than (0,0). Objects however do not have WalkToPoints. This has nothing to do with this template - AGS simply does not specifiy WalkToPoints for objects.

This is what I do:

Code: Adventure Game Studio
  1. function oMyObject_AnyClick()
  2. {
  3.   player.Walk(X,Y, eBlock, eWalkableAreas);
  4.  
  5.   if(UsedAction(eGA_LookAt)) {
  6.     player.Think("It's my object.");
  7.   }
  8.   else if(UsedAction(eGA_Use)) {
  9.     player.Think("I can't touch this - daa da da daaa.");
  10.   }
  11.   else Unhandled();
  12. }
  13.  

Manually make the player go to (X,Y) before processing any specific actions. Sometimes I only include the walk command in the physical actions such as push/pull/open... and let the character "look" from away without moving. But what you may then want to include is a player.FaceX command to at least face the object.
Title: [Solved] When left ...
Post by: poplamanopla on 10 Oct 2010, 19:24
First thank you very much for answering so quickly.
It works great.

Really, thanks for answering.

Now I see it as an easy thing to do, but I was obfuscated trying to find a solution.
For the next time, I will drink a cool beer before make a question.

Thanks again.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 10 Oct 2010, 23:17
I am happy to be of service! There's a lot to be learned on these forum, but only if questions are asked.
Cheers!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 12 Oct 2010, 13:05
If you use the build-in function MovePlayer, you can also get rid of the blocking movement. That's even more SCUMM-esque :)

Code: Adventure Game Studio
  1. function oMyObject_AnyClick()
  2. {
  3.  
  4.   if (MovePlayer(X, Y)) {
  5.  
  6.     if(UsedAction(eGA_LookAt)) {
  7.       player.Think("It's my object.");
  8.     }
  9.     else if(UsedAction(eGA_Use)) {
  10.       player.Think("I can't touch this - daa da da daaa.");
  11.     }
  12.     else Unhandled();
  13.   }
  14. }
  15.  
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 12 Oct 2010, 14:28
I have to shamefully admit that I didn't have a proper look at the new built-in functions that come with the template. That's because it is my first game (blah blah not recommended blah ;) ) so I kept the "new things" to a minimum.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 21 Oct 2010, 21:18
Maybe someone can help me: I need to draw a gui above the dialog gui (gDialogsgui) but I just can't make the other gui appear above the dialog, despite the ZOrder property indicating that it should work... Any thoughts?
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Khris on 21 Oct 2010, 22:15
This isn't specific to the template, is it?

Nevermind, I suspect that the Dialog GUI is always drawn above everything else, regardless of its z-Order property.
Not knowing what exactly you want to achieve I'll simply point you here:
http://www.adventuregamestudio.co.uk/manual/DialogOptionsRenderingInfoFunctions.htm
This allows you to completely customize the rendering of the Dialog GUI.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 21 Oct 2010, 23:28
This isn't specific to the template, is it?

I wasn't sure and thought maybe it was a special property of this template's dialog gui, which on second thought seems rather stupid. ::)

Thanks for pointing in that direction, though I'm not sure if that's going to help me.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Khris on 22 Oct 2010, 02:24
So, what effect do you want to achieve? Maybe there's an easier way.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: abstauber on 22 Oct 2010, 07:39
Another trick is be to make the dialog GUI's background completely transparent and only let the text appear.
Then a GUI behind looks like it's the actual gui.

If it's about scroll buttons or other customisations, take a look at this module. http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36313.0
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 22 Oct 2010, 10:47
Changing the transparency to 100 doesn't suffice as then there's still the black box of the GUI instead of the GUI below being visible. However, it did give me an idea... I can dynamically build a sprite to my needs (as it is just about displaying some info) and then switch the background image of the dialog GUI.

Since you asked, this is what I'm doing:

At some point in the game there appears a dialog gui with text options for the player's wager. I then want to display his remaining chips in an info field on the right (guess what this is all about ;) ). So it should look like this (without text here):
(http://i25.servimg.com/u/f25/11/75/59/84/gui_te10.png)

Before you two had posted I made this workaround:
(http://i25.servimg.com/u/f25/11/75/59/84/gui_te11.png)

Now I have to decide which way I go... The first option is prettier I think, and it doesn't clutter the screen like using an additional row. In the second version however, the dialog GUI doesn't "change" so drastically, which is generally desirable, because you'd want consistency with your GUI . I don't think this is a big issue though, so I will probably go with version 1. I also think by now this belongs in the Critics Loungs so enough of this talk already. :)

Anyways, thanks for your help! I still have no clue how one would easily display another functional GUI without delving deep into the above quoted section of the manual. For my needs though, I have a solution. :)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Khris on 22 Oct 2010, 19:26
As a final note maybe, you don't have to use the built-in dialog mechanism for this; why not create a standard GUI with appropriate buttons and turn it on?
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: cianty on 22 Oct 2010, 19:44
As a final note maybe, you don't have to use the built-in dialog mechanism for this; why not create a standard GUI with appropriate buttons and turn it on?

Yes, that would be another option. But I do use a lot of the dialog functinality in this part so this is the most convenient way to do it.
Title: Any chance to translate the 9-verb MI-style template to Spanish?
Post by: josemarg on 18 Nov 2010, 20:43
Hello there!!!

First of all, let me say that's AWESOME (with capital letters) the work you've done with this template!!

It's all I was going after :)

Now let me explain the matter...

I want to do an adventure using your MI-style template, but I want to translate it to Spanish (I didn't see translated it yet). And I read the manual section of "Translation" but I'm a little lost and didn't see anything of "change the gui image" or something like that...

I see that with the template comes a PSD document to modify it with Photoshop. No problem at all here, because it's a piece of cake to translate it in Photoshop.

The hard thing (to me, that I'm a newbie) is to use the PSD translated version and OVERALL, to translate the commands and its keyboard shortcuts (Give -> Dar, Talk to -> Hablar con, Give -g- Dar -d-, Talk to -t- Hablar con -h-...).

Did I explained myself correctly?

Can you guide me into the correct path, please :)

A lot of thanks!!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Khris on 18 Nov 2010, 21:03
Edit: I probably misinterpreted your post; open guiscript.asc in the project tree and navigate to the AdjustLanguage() function. In there you can set the button sprites and shortcuts. Just uncomment the German block and alter it.


The template is already built to make the translation of the GUI as easy as possible.
All you do is import the modified GUI buttons into the Sprite manager, then translate the game as usual. In the translation source you'll find lines like this:
Talk to %s

a_button_give 5 802 803 Gg
Translating the verb line is obvious; in the case of the button line it's important not to put the text into the translation (don't really know why, all I know is keeping it in the translating screws things up).
So as an example, say the give button is supposed to be at position 3 on the GUI, its up and down sprites are 45 and 46 and the shortcut is d, the translation file is supposed to look like this:
...
a_button_give 5 802 803 Dd
3 45 46 Dd
...
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: josemarg on 18 Nov 2010, 21:35
Wow! That was a fast answer!!

Thanks for your time! I've done the text translations, now I'm going to try to change the GUI sprites.

Thanks!!!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: Khris on 18 Nov 2010, 21:45
In case you missed my edit at the top of my previous post:
Changing the GUI with the translation file method is only suitable if you want to translate a finished game.
To translate the game while/before making it, use the AdjustLanguage function.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - updated 10/03/25
Post by: josemarg on 18 Nov 2010, 22:43
Yep, understood :)

I add the Spanish Buttons in this post. Maybe are useful for somebody without Photoshop knowledges. Download them from:

http://www.elmeuprofe.com/ButtonsSPA.rar (http://www.elmeuprofe.com/ButtonsSPA.rar)

Thanks for your help!!!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 19 Nov 2010, 11:43
Cool, thanks for sharing!
This brought my attention to a more elegant way of internationalisation, so I'd like to deliver verbs buttons in the most common languages (plus my own since I'm selfish ;) )

In a first step, translating the GUI buttons (including options) would be great, so I've prepared a code block and it would be awesome if some native speakers could punch in their language :)

Same goes for the verb buttons themselves, I already included english, german and now also spanish.
So if anyone could grab that photoshop file, and create some verbs, that would be cool too. (Even more cool, if you could provide a little txt with the english translation of those verbs).

Anyhow, here's the code block.

Code: Adventure Game Studio
  1. // English
  2.     OptionsTitle.Text   = "Options";
  3.     OptionsMusic.Text   = "Music Volume";
  4.     OptionsSound.Text   = "Sound Effects ";
  5.     OptionsSpeed.Text   = "Game Speed";
  6.     OptionsDefault.Text = "Default";
  7.     OptionsSave.Text    = "Save";
  8.     OptionsLoad.Text    = "Load";
  9.     OptionsRestart.Text = "Restart";
  10.     OptionsQuit.Text    = "Quit";
  11.     OptionsPlay.Text    = "Resume";
  12.     gPausedText.Text    = "Game Paused. Press Space to Continue";
  13.     RestoreTitle.Text   = "Please choose a game to load";
  14.     RestoreCancel.Text  = "Cancel";
  15.     SaveTitle.Text      = "Please enter a name";
  16.     SaveOK.Text         = "Save";
  17.     SaveCancel.Text     = "Cancel";
  18.     gConfirmexitText.Text = "Are you sure, you want to quit? (Y/N)";
  19.     gRestartText.Text   = "Are you sure, you want to restart? (Y/N)";
  20.  


If this is working out, I'd also like to provide default unhandled events, but of course that depends on the success of the first step.

Thanks in advance ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: BlueAngel on 04 Dec 2010, 12:57
Hi
Trying out this template and I have one embarrassing problem.
How do you make cEgo clickable (the player)?
Like if I have an apple in inventory that I want him to eat.

I have tried with the same script as Bman but it dont work...
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 04 Dec 2010, 15:08
There are two ways:

You can set character clickable in the editor.
or use

cEgo.clickable = true;

somewhere in the script.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: BlueAngel on 05 Dec 2010, 09:39
Thanks. I put that line in Game_start and it works now!  :D
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: cianty on 12 Dec 2010, 22:10
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?
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 16 Dec 2010, 09:16
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.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: cianty on 17 Dec 2010, 06:51
Thanks a lot, Abstauber! I'll look into that tonight.

EDIT: Again, many thanks, Abstauber! It worked perfectly!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 22 Dec 2010, 18:23
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.

(http://img695.imageshack.us/img695/6273/pig1.png) (http://img146.imageshack.us/img146/6018/pig2.png) (http://img405.imageshack.us/img405/8701/pig3.png) (http://img269.imageshack.us/img269/9032/pig4.png)

(http://img84.imageshack.us/img84/3839/pig5.png)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Ghost on 22 Dec 2010, 19:33
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...
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 23 Dec 2010, 13:00
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.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 23 Dec 2010, 15:36
 :)  :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.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 14 Jan 2011, 11:42
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: Adventure Game Studio
  1. // Spanish
  2.     OptionsTitle.Text   = "Opciones";
  3.     OptionsMusic.Text   = "Volumen de la música";
  4.     OptionsSound.Text   = "Efectos de sonido ";
  5.     OptionsSpeed.Text   = "Velocidad de juego";
  6.     OptionsDefault.Text = "Valores por defecto";
  7.     OptionsSave.Text    = "Guardar";
  8.     OptionsLoad.Text    = "Cargar";
  9.     OptionsRestart.Text = "Reiniciar";
  10.     OptionsQuit.Text    = "Salir";
  11.     OptionsPlay.Text    = "Volver";
  12.     gPausedText.Text    = "Juego en pausa. Pulsa Espacio para continuar";
  13.     RestoreTitle.Text   = "Por favor, elige el juego a cargar";
  14.     RestoreCancel.Text  = "Cancelar";
  15.     SaveTitle.Text      = "Por favor, introduce un nombre";
  16.     SaveOK.Text         = "Guardar";
  17.     SaveCancel.Text     = "Cancelar";
  18.     gConfirmexitText.Text = "¿Seguro que quieres salir? (S/N)";
  19.     gRestartText.Text   = "¿Seguro que quieres reiniciar? (S/N)";
  20.  
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Monsieur OUXX on 14 Jan 2011, 14:07
Ooops completely forgot about that.
Or did I send you my work in progress, abstauber? I can't remember.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 14 Jan 2011, 15:21
@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: Adventure Game Studio
  1.        if (action == eMA_WalkTo)   tresult="Go to %s";
  2.   else if (action == eGA_LookAt)   tresult="Look at %s";
  3.   else if (action == eGA_TalkTo)   tresult="Talk to %s";
  4.   else if (action == eGA_GiveTo) {
  5.     if (item.Length>0)             tresult="Give !s to %s";
  6.     else                           tresult="Give %s";
  7.   }
  8.   else if (action == eGA_PickUp)   tresult="Pick up %s";
  9.   else if (action == eGA_Use) {
  10.     if (item.Length>0)             tresult="Use !s with %s";
  11.     else                           tresult="Use %s";
  12.   }
  13.   else if (action == eGA_Open)     tresult="Open %s";
  14.   else if (action == eGA_Close)    tresult="Close %s";
  15.   else if (action == eGA_Push)     tresult="Push %s";
  16.   else if (action == eGA_Pull)     tresult="Pull %s";
  17.   else tresult=" ";
  18.  
  19.  

@Monsieur OUXX
Nope, nothing here yet. But it would still be cool if you could send me something ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 14 Jan 2011, 18:31
Hey, could you answer the Default question? :D

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

The other code

Code: Adventure Game Studio
  1.        if (action == eMA_WalkTo)   tresult="Ir a %s";
  2.   else if (action == eGA_LookAt)   tresult="Mirar %s";
  3.   else if (action == eGA_TalkTo)   tresult="Hablar con %s";
  4.   else if (action == eGA_GiveTo) {
  5.     if (item.Length>0)             tresult="Dar !s a %s";
  6.     else                           tresult="Dar %s";
  7.   }
  8.   else if (action == eGA_PickUp)   tresult="Coger %s";
  9.   else if (action == eGA_Use) {
  10.     if (item.Length>0)             tresult="Usar !s con %s";
  11.     else                           tresult="Usar %s";
  12.   }
  13.   else if (action == eGA_Open)     tresult="Abrir %s";
  14.   else if (action == eGA_Close)    tresult="Cerrar %s";
  15.   else if (action == eGA_Push)     tresult="Empujar %s";
  16.   else if (action == eGA_Pull)     tresult="Estirar de %s";
  17.   else tresult=" ";
  18.  
  19.  

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
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 14 Jan 2011, 19:21
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.


Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 14 Jan 2011, 19:23
Ok, I edited my original post with that, "Valores por defecto" which means Default values

Is it too long?
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Giowe on 15 Jan 2011, 14:30
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);
          }
        }
      }
    }
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 17 Jan 2011, 06:05
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.

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Monsieur OUXX on 17 Jan 2011, 12:52
@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.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 17 Jan 2011, 13:12
@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: Adventure Game Studio
  1.     //left click in inventory
  2.     else if (button==eMouseLeftInv) {
  3.       if (!isAction(eGA_GiveTo))ItemGiven= null;
  4.    
  5.       if (GlobalCondition (1)) {
  6.         // if the mouse is in the inventory and modes Walk or pickup are selected
  7.         SetAction (eGA_Use);
  8.         location=GSinvloc;    
  9.         if (Extension()=='u' && ii.IsInteractionAvailable(eModeInteract)) {
  10.          // use it immediately (not with anything else)
  11.           used_action=global_action;
  12.           ii.RunInteraction(eModeInteract);
  13.           SetAction(eMA_Default);
  14.         }
  15. ///// HERE'S THE CHANGE /////
  16.         else
  17.         {
  18.           SetAction (eGA_LookAt);
  19.           used_action=global_action;
  20.           ii.RunInteraction(eModeLookat);  
  21.           SetAction(eMA_Default);
  22.           //player.ActiveInventory=ii;
  23.         }
  24. ///// HERE'S THE CHANGE /////
  25.       }
  26.  

So in detail, the line
Code: Adventure Game Studio
  1. player.ActiveInventory=ii;
is changed to

Code: Adventure Game Studio
  1.         else
  2.         {
  3.           SetAction (eGA_LookAt);
  4.           used_action=global_action;
  5.           ii.RunInteraction(eModeLookat);  
  6.           SetAction(eMA_Default);
  7.           //player.ActiveInventory=ii;
  8.         }
  9.  
(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 :)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 17 Jan 2011, 13:27
@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...
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 17 Jan 2011, 13:54
Ok, so what about "Restaurar"? It means Restore, i think it's pretty self explanatory :D
Don't you think it could be confused with Load? I mean Sierra kept calling "Load" "Restore" for a long time ;)


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...

The background size at lowres is 320x142, which should be typical SCUMM size. Although, you're right, my sample background is 139px tall. Why, you might ask? I have no clue ;D

But still, the GUI starts at 143.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 17 Jan 2011, 14:04
Don't you think it could be confused with Load? I mean Sierra kept calling "Load" "Restore" for a long time ;)

¡¡This is Lucasarts style!!

No, really... I think having Save/Load makes clear Restore is not Load :D

Maybe poplamanopla can help :D
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 17 Jan 2011, 14:11
¡¡This is Lucasarts style!!

*cough* that was just a test (of course). You've archived 1000 out of 1337 points ;)

Anyway, for the german translation I (or whoever it did) chose "Standard"
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 17 Jan 2011, 17:14
When do you plan to release a new version including this stuff?

I'm REALLY lazy, and I don't want to start to work around the actual version and then have to change stuff :p

No hurries, it's just that depending on how long you think it will take I might overcome my lazyness :D
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 17 Jan 2011, 17:30
Well, nothing really functional is going to be changed. All I have planned for the next release is the new localized GUI that comes with a simple language switch variable.

The way the templates handles inventory items wanted, because most of us think it's an evolution of the old way (I'm sure there's a discussion about this issue somewhere on the boards).

Bottom line, start whenever you want :) If you like to work with the new template, I guess you have to wait a week or two until I release a beta. Until then the default button problem should also be solved ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 17 Jan 2011, 17:32
Thanks!! I'll wait then, I have many things to do and try, so I'll go with those and come back to the template later :D

If you need any translations just let me know!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 17 Jan 2011, 19:03
Images verbs:

(http://img341.imageshack.us/img341/2715/mainverbs.png)

(http://img510.imageshack.us/img510/4945/main2q.png)

I changed the size in some images because I think this is more close to scumm games style.

To work fine you have change the left value in GUI in three images:

btnMainBack: -> just replace image file

action0(Button; ID0): -> just replace image and MouseOverImage file
action0(Button; ID1): -> just replace image and MouseOverImage file
action0(Button; ID2): -> replace image, MouseOverImage file and change left value to 89
action0(Button; ID3): -> just replace image and MouseOverImage file
action0(Button; ID4): -> just replace image and MouseOverImage file
action0(Button; ID5):  -> replace image, MouseOverImage file and change left value to 89
action0(Button; ID6): -> just replace image and MouseOverImage file
action0(Button; ID7): -> just replace image and MouseOverImage file
action0(Button; ID8):  -> replace image, MouseOverImage file and change left value to 89

In my opinion not be good idea do a literally translated the verbs.

By example:

Restore means "restaurar" in spanish, but in a game context could perfectly means "load".

Like a exemple: "Restore game" = "Cargar partida"

By other way, "load" means "cargar" in spanish translation and for me this is the best solution.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 18 Jan 2011, 15:17
Thanks for your work - although I already have the buttons from josemarg. In his translatation he translated pull with "Estirar" instead of "Tirar".

I've checked a spanish MI2 screenshot and they seem to use "Tirar" too.  So should I change it or not?


I'm also confused how to finally call the "defaut values" button: Restaurar or Estándar?

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 18 Jan 2011, 15:30
I'd use Estirar.

Even if Lucastarts used Tirar in it's translations Tirar can mean throw too, and for me it got confusing at the beginning.

As for "Estándar" or "Restaurar" I'd use Restaurar, I personally think it makes more sense than Estándar.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: kaputtnik on 18 Jan 2011, 15:50
Hello!

I'd argue that "restaurar" doesn't work here, mainly because it needs a subject (restaurar algo). "Default" would be "valores por defecto", or "configuración por defecto", which is much too long to fit here. "Restore default" would be "restablecer valores por defecto", which is insanely long. "Por defecto" alone does not work. "Restablecer" alone does not work either, but (in my opinion) makes slightly more sense than "restaurar".

...and here we have another fine example of non-problem solving!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 18 Jan 2011, 15:54
Ohhh, I really like Restablecer, but still doesn't fit, since it's 11 characters long! Argg!!
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 18 Jan 2011, 16:10
Yep, doesn't fit :(  Any abbreviations?

@Giowe
Sorry to left your issue unanswered:

There's no need to disable and enable the gui in each dialog. All you need to do is:
In General Settings set "When player interface is disabled"  to  "GUIs should "be hidden". That's all.


Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 18 Jan 2011, 18:51
Normally in the most games when translated the verb "Pull" to spanish usually use the verb "Tirar".
You can put "estirar" because is correct, but it's something stranger for the people that play point n' click games.

Take a look this screenshot:

(http://img843.imageshack.us/img843/2145/tirarvsestirar.png)

About the issue "Restaurar" / "Estandar" / "Default" : "Deafault values" is translate as  "Valores por defecto".

You can writte also "Por defecto" (11 characters too, as "restablecer"  ;) ), this it's more short for text in a button (if you are refer an options in a game) and it's more common in games. "Restabler" o "Por defecto" are the best solution.

"Estándar" sounds terrible ... And not have much sense.

Estárdar = Standard

 Definition of estándar. (http://translate.google.es/translate?u=http://www.wordreference.com/definicion/est%25C3%25A1ndar&sl=es&tl=en&hl=&ie=UTF-8)

 // edit

You can also resize the text in the button:

(http://img96.imageshack.us/img96/4913/botonesv.png)

or use more space in the graphic:

(http://img152.imageshack.us/img152/1072/botones2.png)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 18 Jan 2011, 22:34
Just in case "Restable" is a typo :p

A quick spanish incise:

poplamanopla... ¿de verdad no te pasó la primera vez que jugaste a un juego que pensabas que Tirar era de arrojar? Recuerdo intentar que Indy "tirara" todos los objetos del inventario alguna vez hasta que de pronto tiró de la librería en casa de su padre y todo tuvo sentido :D
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: cianty on 19 Jan 2011, 07:16
Oooh, you even managed to have GUybrush from MI2 point at the buttons.. nice..  ;D

Isn't it nice to use Tirar if it ALSO can mean throw? It actually begs for a language-exclusive bonus puzzle.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 19 Jan 2011, 07:40
It's actually some kind oh phrasal verb problem:

Tirar = Throw
Tirar de = Pull
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 19 Jan 2011, 16:36

A quick spanish incise:

poplamanopla... ¿de verdad no te pasó la primera vez que jugaste a un juego que pensabas que Tirar era de arrojar? Recuerdo intentar que Indy "tirara" todos los objetos del inventario alguna vez hasta que de pronto tiró de la librería en casa de su padre y todo tuvo sentido :D


// Spanish
 :)
No. Se que puede ser confuso, pero creo que es más bien es un error de comprensión.
No suelo usar el verbo "arrojar", normalmente uso "lanzar" y siempre endendí que "tirar" procedia de "tirar de algo".

Estamos hablando de una plantilla que trata de parecerse al GUI de juegos Scumm así que es mejor no cambiar nada.


// English
No. I know it can be confusing, but I think it is rather a misunderstanding.
I don't usually use the verb "Arrojar"(Throw) normally I use "Lanzar"(Throw) and always I understood that "tirar"(Pull) comes from "tirar de algo" (Pull something).

We're talking about a template that tries to look like the GUI of Scumm games so it's better change nothing.

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: cianty on 19 Jan 2011, 16:46
Unai, thanks for clearing that up!

Not like I am any competent in Spanish (obviously) but I don't see the point in using a different word than the one that is already well-established, as poplamanopla said.
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 19 Jan 2011, 17:03
Ok, I agree poplamanopla has a point. Tirar is the classic Lucasarts word for Pull, so...  ::)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 20 Jan 2011, 13:44
"Restabler" fits perfectly, please don't tell me, it's a typo too. Sweet Guybrush-Pointer btw. :D
Also I'm going to replace estirar with tirar.


Since I already cought your interest, what do you think about not translating unhandled events? I think most users change those anyway and that way they don't have to adjust all other translations.

Oh and thanks for your input, guys :D
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 20 Jan 2011, 16:35
Just in case "Restable" is a typo :p

Sorry!

About Unhadled... I'd translate them... would be a bit weird to have just some lines in english, would probably confuse people that don't speak english at all (the ones that will probably seek a translation)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 20 Jan 2011, 19:30
Quote
would be a bit weird to have just some lines in english, would probably confuse people that don't speak english at all
Hehe, since there's no localized version of the AGS editor yet, I suppose that doesn't count :P

How about "P.defecto" then?

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Unai on 20 Jan 2011, 19:40
"Cfg Dfcto" ?? (Configuración por defecto)
"CfgOrigen" (Configuración origen) <- Not very correct

OMG, all this trouble for a single button... :p

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: Monsieur OUXX on 25 Jan 2011, 12:21
I've translated only the lines that will be visible to the player, not the lines that will be used by the developer (because I guess they're used by the code and it would break the module)
Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: abstauber on 26 Jan 2011, 10:44
Thanks a lot for the input, everyone. Here's the new beta:

http://shatten.sonores.de/wp-content/uploads/2011/01/9verbs_13_beta.zip

1.3    added GUI translations for Spanish, French and German
         slightly expanded buttons in options GUI
         added old school inv handling

@Unai and Monsieur OUXX

Could you please check if I've included your translations correctly?
In guiscript.asc, just change line 6 to
int lang = eLangES; 
or
int lang = eLangFR; 

Title: Re: TEMPLATE: 9-verb MI-style 1.2.1 - TRANSLATION HELP, PLZ
Post by: poplamanopla on 27 Jan 2011, 12:19
Hi, I'm not Unai but I can also help to you ...   :)

At first glance, all seems be OK (spanish translation).

If you allow me a suggestion you can add more comment more before line 6:


// Setup the default Language (only affects the provided GUIs)
//
// eLangDE (German)
// eLangEN (English)
// eLangES (Spanish)
// eLangFR (French)
//


It would be good a translation into Italian  ;)

A little mistake (if can be called mistake ...)

In line 569 comment is // Spanish (again) but should be // French.

By other way.

I see that text in options aren't centered (in previous version too)  if can't resolved easily, you could always use sprites like in the verbs.

That's not very important but would be more nice.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome
Post by: abstauber on 27 Jan 2011, 13:12
Alright, fixed my copy paste comments :)

As far as the option buttons are concerned, I'd rather not switch over to sprites: text is so much more convenient.
The only reason why the verbs are implemented as sprites is that you can't have highlighting on text buttons.

Oh and yes, more translations are very welcome!
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 27 Jan 2011, 14:19
tnx for the help. now i have an other problem:
when i have more then 5 or 6 dialog opions they will disappear, how can i implement the famous 2 monkey island style arrows to scroll the dialog options up and down?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 27 Jan 2011, 14:30
Scrolling dialogs, eh?

Well, I'm afraid you've to master another module ;)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36313.0


Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Monsieur OUXX on 27 Jan 2011, 16:45
I understand that it is your design choice that the GUI language supercedes the game's language. Is it a wise choice?

Also, how does the "lang = eLangFR" relate to "if (tr_lang =="fr")"? The first one is for the game GUI, and the other one for the game's translations?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 27 Jan 2011, 18:22
perfectly done! u are the best :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 27 Jan 2011, 20:06
@Giowe:
Great. Good to hear that's not too hard to master the CDG module :)

@Monsieur OUXX:
Of course it is :P Hehe, from a more  serious point of view, I think it is very convenient and also attracts more beginners to start a 9verb game in their language.

The template only provides translations for the GUI elements, so you can directly jump in and start making the game without the need to worry how .trs files work or how to set up those wicked text strings for the verb buttons.

Just think how it would be in 1.2.1:
- First you have to create new verb sprites and announce them deep inside the script, using a cryptic space separated string.
- Then you hopefully create a game and think about translations. You have to add more verb sprites and create the .trs files.
- Then you need to adjust the text strings inside the .trs and finally send it to your translators.
Not to mention that you also need to understand how the sprite verb systems works.

In 1.3 it is:
- Set lang to your preferred language, like "eLangFR"
- Make your game
- Create e.g. "spanish.trs", translate "GAME_LANGUAGE" to "es" and send it away (or do it afterwards)
Done

From a designers point of view, it's the template's task to provide the GUI and the users task to make that game. Therefore it's not the users top priority to worry about how one can setup GUI buttons with nine text strings ;)

Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Monsieur OUXX on 28 Jan 2011, 10:15
@Monsieur OUXX:
From a designers point of view, it's the template's task to provide the GUI and the users task to make that game. Therefore it's not the users top priority to worry about how one can setup GUI buttons with nine text strings ;)

You do make sense -- I was just wondering why the template doesn't simply get its default language value from the game's selected runtime language.
Something like: lang = tr_lang       (it wouldn't work like that but you know what I mean).

It's just a suggestion. Otherwise if the game creator distributes his game with an "English" GUI, then no matter what language the player selects, he'll be stuck with an English GUI, even though the rest of the game will be in German/Spanish/French..
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 28 Jan 2011, 11:37
Doesn't this piece of code take care of it?

Code: Adventure Game Studio
  1. function game_start() {
  2.  
  3.   String tr_lang;
  4.   // --- translate GUI action buttons ---
  5.   tr_lang = GetTranslation("GUI_LANGUAGE");
  6.   tr_lang = tr_lang.LowerCase();
  7.  
  8.   if (tr_lang == "de") {
  9.     lang = eLangDE;
  10.   }
  11.   else if (tr_lang =="es") {
  12.     lang = eLangES;
  13.   }
  14.   else if (tr_lang =="fr") {
  15.     lang = eLangFR;
  16.   }  
  17.   else if (tr_lang =="en") {
  18.     lang = eLangEN;
  19.   }    
  20. .....
  21.  

GUI_LANGUAGE appears in the .trs file and needs to be set to the according language
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Monsieur OUXX on 28 Jan 2011, 11:55
Doesn't this piece of code take care of it?

OK I guess that's what confusing me : when I tested beta 1.3, the GUI was in French because of that line :
int lang = eLangFR;   

Is it something you added just for test's sake?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 28 Jan 2011, 12:10
Yep :D

edit--

or wait:
 

"int lang = eLangFR"  is for the initial language setup. GUI_LANGUAGE from the .trs overrides this once you have translation files.

But initially it should be eLangEN, which I forgot to set back.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Monsieur OUXX on 28 Jan 2011, 13:07
or wait:

HA! YOU SUCK!

Hehe, ok, that makes more sense. Bottom line is : Great module!!!
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 30 Jan 2011, 13:33
i found a bug:
if you click rapidly many times the left button of the mouse to say to your character to go in a place, every time you click he stop his movement, and, after a series of clicks he stops definitively and you cant move at all...
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 31 Jan 2011, 10:53
Hmmm... I can't replicate this (AGS 3.2) and I clicked like 2 minutes on the same spot.
Roger never totally stopped walking or animating. Anyone else having this problem?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 31 Jan 2011, 13:03
i use ags 3.1. i'l try with 3.2... the error was my fault but if u click many times in different spots he will stop :\
anyway you see that if u click many times the character nearly stop?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 31 Jan 2011, 15:04
ok, with 3.2 he never stop, but the first problem remain, if u click many times the character stops for a wile.. how can avoid that?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 31 Jan 2011, 16:02
Ah I think I know what you mean. You click like crazy at one point, but instead of moving, the player is just animating until you stop clicking.

Well... that's the default walking behavoir of AGS and also happens in the default template.

You could catch the mouse coordinates, check if the character is already moving in that direction and override the processclick command. But I'm not too sure about the side effects. Maybe you should ask this at the tech boards :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 01 Feb 2011, 10:55
i'l try.
in the default template that didn't happen
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 01 Feb 2011, 11:25
Seriously? Then I still didn't get your problem. The issue I thought was your problem happens in the default template too.

So could you please elaborate on your problem again? For dummies please :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 01 Feb 2011, 12:52
wops, my error. the problem is exacty that you described and i have it with the standard ags game too. but if u run the example game of smooth scrolling + parallax modul it runs perfectly, so i think that in that modul there is something that solve my problem
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: abstauber on 01 Feb 2011, 13:18
Alright, I'm glad that this is solved then :)

Since this is just a GUI template and not the whole SCUMM deal, I'll resist from integrating the walk/movement code ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 beta - TRANSLATORS welcome!
Post by: Giowe on 01 Feb 2011, 13:42
if you need the camera scumm like movement, add this modul that make the camera scrolling equal to scumm games

code:
//Backgorund sliding:
//-----------------------------------------------------------------------------
//Pseudo const
//
//S_VELOCITY is the camera speed. 0 no movement
//
int S_VELOCITY = 3;
int S_DISTANCE = 160;
//-----------------------------------------------------------------------------
//Global var
int xCameraCenter;
int halfScreenSize;
//State var
int movementVersor = 1; // 1 for right movement -1 for left movement
bool enableMovementRight = false;
bool enableMovementLeft = false;
//-----------------------------------------------------------------------------
//Set the new center:
//Put the character in the center of the screen
function on_event (EventType event, int data)
{
  if (event == eEventEnterRoomBeforeFadein){
    halfScreenSize = System.ScreenWidth/2;
    xCameraCenter = GetViewportX() + 160 -player.x;
    if(xCameraCenter < 0) xCameraCenter = 0;
  }
}
//-----------------------------------------------------------------------------
//Camera motion
function repeatedly_execute_always()
{
  SetViewport(xCameraCenter, 0 );
  //Check the event and set the direction
  if (  player.x > S_DISTANCE + halfScreenSize + GetViewportX() ){
    enableMovementRight = true;
    movementVersor = 1;
  }
  if (player.x < (GetViewportX() + S_DISTANCE) ){
    enableMovementLeft = true;
    movementVersor = -1;
  }
  //If the camera is on the left border or right border disable the movement
  if( Room.Width <= GetViewportX() + halfScreenSize*2 ) enableMovementRight = false;
  if(GetViewportX() == 0) enableMovementLeft = false;
  //Check if the camera and the player are in the same position
  if(xCameraCenter >= player.x - halfScreenSize) enableMovementRight = false;
  if( xCameraCenter <= player.x - halfScreenSize) enableMovementLeft = false;
  //if the movement is enabled
  if( enableMovementRight == true || enableMovementLeft == true ) xCameraCenter += movementVersor*S_VELOCITY;
}
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 15 Feb 2011, 08:03
Just wanted to let you know, that 1.3 is finally out.

Thanks to all translators :)


edit: I hope AGS 3.2 is soon officially announced, so I can ditch the 3.1 support :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: RoliX on 01 Mar 2011, 14:33
Awesome! Thanks a lot!  :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: BlueAngel on 26 Mar 2011, 12:14
Hi
I have a problem with scrolling my inventory window.
If the player got more things than the window can hold, the down arrow light up and you can press it.
But the item under (row 2) just flash/shows for a second then it (the window) shows the first row again.
I havent change anything (I think) but the graphics and the size of the window.
Any idea?
 ???
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 26 Mar 2011, 20:29
Hmm, could you post the version of the template you're using?

In the older versions you had to adjust some variables to your inventory item size. So you can also check the beginning of guiscript.asc and see if the inv variables match your new item size.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: BlueAngel on 27 Mar 2011, 09:57
I'm using version Version: 1.2.1 and AGS 3.2.0.102

I also should mention that the game I’m making is in 800X600. I read in an old thread that resizing could mess things up.

I have been looking in the guiscript.asc as that was mention in that old thread but not finding the right things. I keep on looking. Do you think I should download a new version of the module? I afraid of messing my game up as it is almost finished.

EDIT: So sorry for wasting your time. I forgot I split up the main gui and the inventory gui. Script now working.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 28 Mar 2011, 09:14
Great to hear that you've solved that puzzle :)

About my question regarding the version: I just wanted to make sure that I look into the right code base, a  whole template upgrade should never nessecary. Most things are patchable :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: SN1984jm on 13 May 2011, 18:59
I thought I had seen a specific topic for asking questions about the use of this template, but I can't seem to find it anymore.
I'm just gonna have to ask it here I'm afraid (even though I can hardly believe it has not been asked before, but again, couldn't find the answer).

If you change the resolution to say, 800x600 in the very beginning of setting up your game, how can you best fix the GUI (It's all over the place now). Is this done in the overall script of the template, or do I need to change many GUI options inside AGS?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 15 May 2011, 12:24
If you change the resolution to say, 800x600 in the very beginning of setting up your game, how can you best fix the GUI (It's all over the place now). Is this done in the overall script of the template, or do I need to change many GUI options inside AGS?

You just need to adjust the GUIs inside the editor, no need to alter the code for that.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Jackpumpkinhead on 30 Jun 2011, 16:43
I thought I would post in here instead since my problem is with the 9verb MI template. As I mentioned in the previous thread I am getting an error when I try to adjust the volume in the options menu. The error says that -1 is not between 0...100.

I am using version 1.2.1

(http://i898.photobucket.com/albums/ac187/Jackpumpkinhead85/error.jpg)

Also I wanted to know, if I get version 1.3 and start using it, is there a lot I wil have to change to the game to make it run right? Will I have to make any changes in scripting or code?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Jackpumpkinhead on 30 Jun 2011, 20:46
updated with picture
sorry if this is considered a double post
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Khris on 30 Jun 2011, 20:53
If you select the slider in AGSEdit, what does it say for MaxValue and MinValue?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Jackpumpkinhead on 30 Jun 2011, 21:41
Not sure, would this have something to do with it? Would I just change the min value to -1 if it were 0? Also when you use the slider in the game to turn the music down it just mutes the music. Though this may be due to the error.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Khris on 01 Jul 2011, 01:01
I've just been looking at AGS 3.1, the parameter for SetMusicVolume was supposed to be in the range of -3 to 3. So I'm guessing that your template was made for that version of AGS or an even older one and the music volume's min and max values are probably -3 and 3.

While the code tries to call the correct command depending on the AGS version, it doesn't set the slider values.

This is pretty much a bug in the template.
You can fix this by setting the MinValue to 0 and the MaxValue to 100 for both the Sound and Music volume slider.

To fix the template, this must be added to game_start():

Code: Adventure Game Studio
  1. #ifver 3.2
  2.   OptionsSldMusic.Min = 0;
  3.   OptionsSldMusic.Max = 100;
  4.   OptionsSldSound.Min = 0;
  5.   OptionsSldSound.Max = 100;
  6. #endif
  7. #ifnver 3.2
  8.   OptionsSldMusic.Min = -3;
  9.   OptionsSldMusic.Max = 3;  
  10.   OptionsSldSound.Min = 0;  
  11.   OptionsSldSound.Max = 255;
  12. #endif

And at the start of OptionsDefault_OnClick:

Code: Adventure Game Studio
  1. #ifver 3.2
  2.   OptionsSldMusic.Value = 80;
  3.   OptionsSldSound.Value = 90;
  4. #endif
  5. #ifnver 3.2
  6.   OptionsSldMusic.Value = 2;
  7.   OptionsSldSound.Value = 230;
  8. #endif
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 01 Jul 2011, 07:42
Oh, there's really a bug in OptionsDefault_OnClick, but applies if you use AGS 3.1.

@Khris: Wouldn't simply setting those min and max values in the GUI editor do the same thing? Of course for Jack it's a good start to corner his bug. But I don't exactly get why this could be a bug.

@Jack regarding updating to 1.3
Damn, I should have written an upgrade plan :D

For updating there are quite a few steps to do, so unless you know what you're doing I'd say to rather stick to 1.2.1 for a while. But if you want to get your game translated to lots of different languages, maybe an update isn't such a bad idea after all.

Anyway here's the plan:

First copy this variable block to a safe location so it doesn't get overwritten.
Code: Adventure Game Studio
  1. int
  2. ActionLabelColorNormal          = 15219,  // colour used in action bar
  3. ActionLabelColorHighlighted     = 38555,  // highlighted colour used in action bar
  4. invUparrowONsprite              = 124,    // sprite slot of the upper inv arrow / normal
  5. invUparrowOFFsprite             = 154,    // sprite slot of the upper inv arrow / disabled
  6. invUparrowHIsprite              = 137,    // sprite slot of the upper inv arrow / highlighted
  7. ....and so on...
  8.  

Then you need to find the code block were you define your button sprites. Unfortunately I can't give you line numbers since I don't archive the old versions

Code: Adventure Game Studio
  1.    
  2.     SetActionButtons(eGA_GiveTo, "a_button_give    0  125  138 Qq");
  3.     SetActionButtons(eGA_PickUp, "a_button_pick_up 1  126  139 Ww");
  4.     SetActionButtons(eGA_Use,    "a_button_use     2  127  140 Ee");
  5.     SetActionButtons(eGA_Open,   "a_button_open    3  129  142 Aa");
  6.     SetActionButtons(eGA_LookAt, "a_button_look_at 4  134  147 Ss");
  7.     SetActionButtons(eGA_Push,   "a_button_push    5  131  144 Dd");
  8.     SetActionButtons(eGA_Close,  "a_button_close   6  133  146 Zz");
  9.     SetActionButtons(eGA_TalkTo, "a_button_talk_to 7  130  143 Xx");
  10.     SetActionButtons(eGA_Pull,   "a_button_pull    8  135  148 Cc");  
  11.  

If you did any more edits to guiscript.ash (like different unhandled event responses), you should save those too.

Now you can copy and paste guiscript.asc and .ash from the newer template and after that you can simply set the values back to your old ones thanks to your backup ;)


Globalscript:

In the global script, you have to add this block to the other imports at the top of the script
Code: Adventure Game Studio
  1. import int lang;
  2.  

This is the new game_start function.
Code: Adventure Game Studio
  1. function game_start() {
  2.  
  3.   String tr_lang;
  4.   // --- translate GUI action buttons ---
  5.   tr_lang = GetTranslation("GUI_LANGUAGE");
  6.   tr_lang = tr_lang.LowerCase();
  7.  
  8.   if (tr_lang == "de") {
  9.     lang = eLangDE;
  10.   }
  11.   else if (tr_lang =="es") {
  12.     lang = eLangES;
  13.   }
  14.   else if (tr_lang =="fr") {
  15.     lang = eLangFR;
  16.   }  
  17.   else if (tr_lang =="en") {
  18.     lang = eLangEN;
  19.   }
  20.   else if (tr_lang =="it") {
  21.     lang = eLangIT;
  22.   }  
  23.   AdjustLanguage();  
  24.  
  25.   // --- Set default Door strings (Look, locked and wrong item)
  26.   set_door_strings("The door looks solid.","It is locked.","I can't unlock it with that.","I have to close it first.","Now it's unlocked.","The door is locked again.");
  27.   // --- initialize game settings ---
  28.   SetDefaultAction(eMA_WalkTo);    
  29.   set_double_click_speed(GetGameSpeed()/4);
  30.  
  31.   // --- set the pixel gap for listbox items according to the screen res
  32.   if (System.ScreenWidth<640) listBoxGap = 2;
  33.   else listBoxGap = 4;
  34. }
  35.  

That should do the trick.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Khris on 01 Jul 2011, 12:19
@abstauber:
You're right, I'm not sure how the pre-3.2 slider and 3.2 code ended up in the same game, but it's looks like a user error.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Jackpumpkinhead on 05 Jul 2011, 15:05
Sorry for the delay on the reply
The "bug" is fixed
Turns out you guys were right the min and max values for the slider weren't set right

@abstauber: thanks for the update plan. I'll probably use it once everything is finished
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: DrakeStoel on 27 Oct 2011, 08:09
I'm having a weird problem with the door script. I put in my code, the door opens and closes fine, but I can't use it. It's very strange
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Khris on 27 Oct 2011, 09:31
What do you mean, 'use' it? As in click the Use verb, then the door? You're aren't really supposed to do that; use a region to switch rooms instead.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 27 Oct 2011, 09:45
use a region to switch rooms instead.
The doorscript also handles the room change. To enter it, you need to click (walk to) on the hotspot and wait until the player gets there.
Remember, the opened door is the object and has to be unclickable, which you set up with init_object.

Or by "use" did you mean the verb button?
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: DrakeStoel on 28 Oct 2011, 01:07
I've done all that. And by use I just mean my character won't go through to the next room. Here's the codes I'm using.
Code: Adventure Game Studio
  1. function room_FirstLoad()
  2. {
  3. set_door_state(1, 0);
  4. init_object(1, oVoodooDoor.ID);
  5. }

and

Code: Adventure Game Studio
  1. function hVoodooDoor_AnyClick()
  2. {
  3.   if (any_click_on_door (1, oVoodooDoor.ID, 470, 182, eDir_Right, 2, 456, 186, eDir_Right)==0) Unhandled ();
  4. }

Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 28 Oct 2011, 12:37
Hmm.. I just tried your code and it works fine for me. Does anything happen after you click on the opened door? Does the character at least move towards it?

Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: DrakeStoel on 28 Oct 2011, 14:35
My character walks right up to the point in the code then he just stops, and nothing else happens.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 30 Oct 2011, 13:20
Well you could upload your game somewhere for me to look at.
Currently it doesn't seem like it's a bug in the template.

Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: DrakeStoel on 30 Oct 2011, 20:14
I would LOVE to upload it, it's just that I don't know how.  :-[
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: straydogstrut on 30 Oct 2011, 20:56
If you don't have your own webspace, i've seen quite a few people using Mediafire or somesuch to host their files. Personally I find it a bit unprofessional for hosting final games but for quick Q&A things like this it's probably a good idea.

Instead you could try Dropbox (http://"http://www.dropbox.com/"). There's a vid on the website that explains how it works but basically it gives you a folder on your computer that you can chuck stuff into and it will be available on all your other computers, and on the Dropbox website.

Once Dropbox is installed, zip up your game and chuck it in the Public folder, then just right click on it and 'copy public link' which you can paste in this thread or a PM to abstauber.

Hope that helps :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: DrakeStoel on 31 Oct 2011, 00:50
Thanks straydogstrut. That helps a lot!  ;D As for the file, here it is:

EDIT

The first link didn't work. HERE is the proper one:

http://dl.dropbox.com/u/47552660/My%20Game.zip

Sorry, it's kinda big.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 31 Oct 2011, 07:32
Found the error, for some reason, the GoTo command in your guiscript is broken.

guiscript.asc, line 702:
Code: Adventure Game Studio
  1.     if (blocking==0) player.Walk(xtogo, ytogo);
  2.     else if (blocking==0) {
  3.       player.Walk(xtogo, ytogo, eBlock);
  4.       arrived=0;
  5.     }
  6.     else if (blocking==0) arrived=MovePlayer(xtogo, ytogo);
  7.  
has to be
Code: Adventure Game Studio
  1.     if (blocking==0) player.Walk(xtogo, ytogo);
  2.     else if (blocking==1) {
  3.       player.Walk(xtogo, ytogo, eBlock);
  4.       arrived=1;
  5.     }
  6.     else if (blocking==2) arrived=MovePlayer(xtogo, ytogo);
  7.  
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: DrakeStoel on 31 Oct 2011, 14:11
Yup. That did it. Thanks a bunch.  ;D
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 29 May 2013, 10:42
Since we're getting a new release of AGS, I wonder I could drop the support for the old audio system. Currently the script checks for #ifver 3.2 and I suppose that breaks for 3.3 anyway.

I hope you're okay with that decision.
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Crimson Wizard on 29 May 2013, 12:37
Since we're getting a new release of AGS, I wonder I could drop the support for the old audio system. Currently the script checks for #ifver 3.2 and I suppose that breaks for 3.3 anyway.

As an option you may check "#ifdef STRICT_AUDIO"
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: Crimson Wizard on 01 Jul 2013, 13:50
Are the download links still valid? I am not able to connect to http://shatten.sonores.de, at all.

My intention was to check the latest version of the template and see if it has same problem as the one shipped with AGS 3.2.1:
The "Quit" button on the Options gui sais "QuitätÖ" when using English translation (I have a feeling I reported this back in 2011).

Other than that, are you still planning on removing old-style Audio support? In my previous response I suggested using "#ifdef STRICT_AUDIO", but that's not a fully proper solution, because in AGS >=3.2 users may mix audio styles, e.g. turn backwards compatible mode to only use old-style functions in particular cases. Perhaps a new macro may be introduced, like "#define USE_OLD_AUDIO", which may only be enabled if STRICT_AUDIO is on:
Code: Adventure Game Studio
  1. #ifdef STRICT_AUDIO
  2. #define USE_OLD_AUDIO // comment this line if you want this template essential functions use only new style audio
  3. #endif
  4.  
Title: Re: TEMPLATE: 9-verb MI-style 1.3 UPDATE (15th Feb 2011)
Post by: abstauber on 01 Jul 2013, 14:11
Aw, it's down again? I seriously need to find a different provider. Almost every sunday it crashes with no cron-jobs involved...grr.
The "Quit" button on the Options gui sais "QuitätÖ" when using English translation (I have a feeling I reported this back in 2011).
Hehe, that was a test to see if the font supports int. characters. There are also two more bugfixes in the most recent version, but I haven't uploaded it yet.

Other than that, are you still planning on removing old-style Audio support?
Well, I'll try to define a constant with a few ifver lines to keep the old-style audio in.

edit:
Here's the new one. I've just learned that ifver 3.2 means "3.2 and above", so it would have worked all the time. Still I've added the constant USE_OBJECT_ORIENTED_AUDIO, so code is a bit easier to read.
http://shatten.sonores.de/wp-content/uploads/2013/07/9verb_131.zip
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Crimson Wizard on 08 Jul 2013, 13:49
I never paid attention to this before, but there's a Walk Behind mask in the first room, looking like a rope bridge shape.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 08 Jul 2013, 14:06
Hehe - never noticed this too. I don't even know to which background that mask belonged to.

I've updated the zip (without a new version number)
http://shatten.sonores.de/wp-content/uploads/2013/07/9verb_131.zip
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Crimson Wizard on 08 Jul 2013, 14:23
Hehe - never noticed this too. I don't even know to which background that mask belonged to.

:) Could that be:

(http://img29.imageshack.us/img29/5075/j12o.png)

(http://www.le-serpent-retrogamer.org/wp-content/uploads/2013/04/Monkey-Island-monkey-island-530473_640_400.jpeg)
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 08 Jul 2013, 14:40
Wow, so this survived since Proskritos first release in 2006?! Now I almost feel bad that I removed it :)

Also - stunning game guessing skills :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: monkey0506 on 08 Jul 2013, 15:06
I've just learned that ifver 3.2 means "3.2 and above", so it would have worked all the time.

I was going to say something about this. The whole "checks for #ifver 3.2 and I suppose that breaks for 3.3" bit filled me with unfathomable rage. Especially when no one pointed out that since its induction, #ifver/#ifnver have always meant "version X or higher". This isn't explicitly stated in the manual description text, but it is explicitly stated in the manual's example:

Quote from: The Manual
#ifver 2.72
// do stuff for 2.72 and above
#endif

Still I've added the constant USE_OBJECT_ORIENTED_AUDIO, so code is a bit easier to read.

Without looking through your code, when you say you've added a constant, which of the following do you mean?

Code: Adventure Game Studio
  1. // (1) defined a new VALUED macro, enum, or readonly boolean which the user can edit at design-time
  2. #define USE_OBJECT_ORIENTED_AUDIO true
  3.  
  4. enum ModuleAudioSettings
  5. {
  6.   USE_OBJECT_ORIENTED_AUDIO = true
  7. };
  8.  
  9. readonly bool USE_OBJECT_ORIENTED_AUDIO = true; // could also be writeprotected property or readonly attribute of struct
  10.  
  11. // (2) defined a new VALUED macro or enum which is based on STRICT_AUDIO
  12. #ifdef STRICT_AUDIO
  13. #define USE_OBJECT_ORIENTED_AUDIO true
  14. #endif
  15. #ifndef STRICT_AUDIO
  16. #define USE_OBJECT_ORIENTED_AUDIO false
  17. #endif
  18.  
  19. enum ModuleAudioSettings
  20. {
  21.   USE_OBJECT_ORIENTED_AUDIO =
  22.   #ifdef STRICT_AUDIO
  23.     true,
  24.   #endif
  25.   #ifndef STRICT_AUDIO
  26.     false,
  27.   #endif
  28. };
  29.  
  30. readonly bool USE_OBJECT_ORIENTED_AUDIO =
  31. #ifdef STRICT_AUDIO
  32.   true;
  33. #endif
  34. #ifndef STRICT_AUDIO
  35.   false;
  36. #endif
  37.  
  38. // (3) defined a new UNvalued macro based on STRICT_AUDIO
  39. #ifdef STRICT_AUDIO
  40. #define USE_OBJECT_ORIENTED_AUDIO
  41. #endif

Any of the variants of (1) would IMO make the code "a bit easier to read" at the expense of conditional compilation (only compiles on AGS 3.2+), and requiring STRICT_AUDIO to be false:

Code: Adventure Game Studio
  1.  // some_func
  2.   if (USE_OBJECT_ORIENTED_AUDIO)
  3.   {
  4.     aSound.Play();
  5.   }
  6.   else
  7.   {
  8.     PlaySound(1);
  9.   }

The variants of (2) would be utterly useless because if STRICT_AUDIO was set to false then USE_OBJECT_ORIENTED_AUDIO would never be true, and otherwise, the else branch would fail to compile.

Code: Adventure Game Studio
  1.   if (USE_OBJECT_ORIENTED_AUDIO)
  2.   {
  3.     // if STRICT_AUDIO is true this branch is run and compiles fine
  4.     // if STRICT_AUDIO is false this branch is ignored but compiles fine
  5.     aSound.Play();
  6.   }
  7.   else
  8.   {
  9.     // if STRICT_AUDIO is true this branch won't compile
  10.     // if STRICT_AUDIO is false this branch is run and compiles fine
  11.     PlaySound(1);
  12.   }

The final way I can think of "defining a constant" in AGS (3) would do nothing except complicate the code by serving as an exact replacement for checking STRICT_AUDIO:

Code: Adventure Game Studio
  1. #ifdef USE_OBJECT_ORIENTED_AUDIO
  2.   aSound.Play();
  3. #endif
  4. #ifndef USE_OBJECT_ORIENTED_AUDIO
  5.   PlaySound(1);
  6. #endif

This is exactly similar to using STRICT_AUDIO (in fact, the two are exactly synonymous in this case).

So, the only way I can conceive that USE_OBJECT_ORIENTED_AUDIO could possibly be useful is (1), which requires STRICT_AUDIO to be set to false to prevent compilation errors. The end-user then has to open the module script and edit the design-time definition if they want to change audio styles. If they replace/upgrade the module, their setting will be lost. In the end, there is no way that this "benefit" would outweigh the end-user's costs. I like the concept you were going for, but I see no practical use case for it, and I'd say you should stick to the editor-defined macro and conditional compilation.

If you really wanted to, I suppose that you could try conditionally importing the old-style audio commands directly into the module script if STRICT_AUDIO is defined (the functions still exist, they just aren't imported). Of course my understanding is that to use the old-style audio commands with the new-style audio the clips have to be given very specific script names...I'm not sure. It could give a way of getting around the nastiness of conditional compilation and allow you to provide a native if-else statement block instead of using the preprocessor. But there's not a way to translate an AudioClip* into an ID for PlayMusic/Sound/etc. So I don't know how genuinely useful it would ultimately be anyway. Interesting idea though...and I could see uses for the concept elsewhere...
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Crimson Wizard on 08 Jul 2013, 15:33
I was going to say something about this. The whole "checks for #ifver 3.2 and I suppose that breaks for 3.3" bit filled me with unfathomable rage. Especially when no one pointed out that since its induction, #ifver/#ifnver have always meant "version X or higher". This isn't explicitly stated in the manual description text

That's the point, isn't it? It is not explicitly stated in manual, and the name of the preprocessor command does not explicitly imply it either. Is there really a reason for "unfathomable rage"? Doesn't your religion teach you of understanding and forgiveness? Oh well, doesn't plain common sense teach to understand such situations?

Without looking through your code, when you say you've added a constant, which of the following do you mean?

What can I say? Just *facepalm* maybe.
Definition:
Code: Adventure Game Studio
  1. #ifver 3.2
  2. #define USE_OBJECT_ORIENTED_AUDIO
  3. #endif
  4.  
Usage example:
Code: Adventure Game Studio
  1. #ifdef USE_OBJECT_ORIENTED_AUDIO
  2. // In AGS 3.2 you do it this way:
  3. //   Audioclip *openDoorSound = aDoorsound;
  4. AudioClip*  openDoorSound,  
  5.             closeDoorSound,
  6.             unlockDoorSound;    
  7. #endif
  8.  

Regarding STRICT_AUDIO, as I mentioned several posts above, this is theoretically possible that user writes 3.2 game while backwards compatibility is enabled to allow him/her to use old PlayMusic functions along with AudioClips.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 08 Jul 2013, 15:36
/me needs way to long for teh english.
I still post it for the records :)

The whole "checks for #ifver 3.2 and I suppose that breaks for 3.3" bit filled me with unfathomable rage.
Such things should never fill you with rage :P

Without looking through your code,...

Let me support your laziness
Code: Adventure Game Studio
  1. #The very first script header:
  2. #ifver 3.2
  3. #define USE_OBJECT_ORIENTED_AUDIO
  4. #endif
  5.  

And this is how it works
Code: Adventure Game Studio
  1. #ifdef USE_OBJECT_ORIENTED_AUDIO
  2.   import int wicked_sound_function(AudioClip *sound);
  3. #endif
  4.  
  5. #ifndef USE_OBJECT_ORIENTED_AUDIO
  6.   import int wicked_sound_function(int sound);
  7. #endif
  8.  

People should let go of "play-by-numbers" anyway. If somebody insists of addressing sounds by numbers in AGS 3.2 (including the template's two functions), one can still comment the definition of USE_OBJECT_ORIENTED_AUDIO.

edit:
@Crimson: Hooray, we even quoted the same lines :D
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 08 Jul 2013, 15:37
--double post, sorry
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Monsieur OUXX on 23 Oct 2013, 14:27
I suggest this font be added to the template : https://www.dropbox.com/s/5dx072m33a6v6vm/iMuseFont.zip

(http://img2.imageshack.us/img2/8323/foacreditsfont.gif)

It's the Lucasarts credits font, as seen in Fate of Atlantis.
I know this is a MI template, but it's the closest thing to the FoA gui.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 23 Oct 2013, 14:57
There are two things to consider: copyright and internationalization.
Can this font e.g. display Señörá ? If yes and it's free to use, then +1 from my side.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Monsieur OUXX on 24 Oct 2013, 01:54
There are two things to consider: copyright and internationalization.
Can this font e.g. display Señörá ? If yes and it's free to use, then +1 from my side.

No to both answers. :(
That's the real font from FoA. But isn't the speech font of AGS too?
That's not an international font but I must admit I don't know how these work (i.e. how to create one from this). I'll have to have a close look.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 24 Oct 2013, 12:48
That's not an international font but I must admit I don't know how these work (i.e. how to create one from this). I'll have to have a close look.
As far as I know you need to create a ttf font for this. Otherwise you'd need to replace special chars with foreign ones (like * acting as an ä). Strazer made such a font: http://www.strazer.net/ags/nnscifnt.zip

The default speech font of AGS should be from Space Quest 4, but I don't know if it's a rip or a facsimile.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Monsieur OUXX on 27 Oct 2013, 18:04
The default speech font of AGS should be from Space Quest 4, but I don't know if it's a rip or a facsimile.
I meant the Lucasarts-like font. But maybe that font doesn't actually exist in AGS, and I've dreamt it. Maybe so far I've only used unofficial templates that included it, without realizing. I'm not sure.

Thanks a lot for the link you gave.
Only for accuracy's sake: That font is not the same one as the one I posted("my" FoA font's capital letters are about 12 pixels tall, and the small letters are actually capital letters too, just small. "your" font's capital letters are 16 pixels tall and the small letters are regular letters).
I don't know if the font you linked is from a Lucas game, or just meant to look similar. They sure look similar.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Crimson Wizard on 24 Jul 2014, 21:24
I want to point out a specific problem that some people may have with this template.

For two times a user reported a bug that his "speech animation plays only first two frames". I myself got into same once when randomly testing speech animations.
Upon investigation I found that this is caused by Lip sync from 9-verbs template, which only has 1 frame used for vocals. This caused speech animation to jump between two frames.

Is this made on purpose?
May I propose to remove lipsync from this template? Lip sync is usually an "advanced" thing and seem to confuse beginners.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: abstauber on 25 Jul 2014, 09:12
Is this made on purpose?
As far as I remember this is just a relic. I usually use portraits so I didn't even notice it.

May I propose to remove lipsync from this template? Lip sync is usually an "advanced" thing and seem to confuse beginners.
Proposal accepted :)
I'll upload an updated version today.
--edit: done!
Title: Re: TEMPLATE: 9-verb MI-style 1.3.1 UPDATED (1st July 2013)
Post by: Crimson Wizard on 15 Oct 2014, 21:44
I just noticed.
There's a manual PDF included to the old version archive (http://shatten.sonores.de/wp-content/uploads/2011/02/9verb_13_AGS31.zip), but not to the latest.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: abstauber on 16 Oct 2014, 07:10
You are right, but since the manual is also included inside the template itself I got a little lazy ;)

I've just uploaded a add-on package including the gui graphics and the manual.
http://shatten.sonores.de/wp-content/uploads/2014/10/9verb_addon.zip
Thanks for the heads up!
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: Crimson Wizard on 22 Nov 2014, 22:31
I want to report a bug.

1. Open main menu.
2. Press any key (I tested with letter and number keys).
3. Click "Resume".

The Action text dissapears and show up only after you click right mouse button.
This bug also occurs with version installed with AGS 3.2.1.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: abstauber on 25 Nov 2014, 17:07
Sorry for the late reply, a nasty cold kept me away from the screen until now.

Anyway I've fixed this bug and two others reported by rmonic79.
http://shatten.sonores.de/wp-content/uploads/2014/11/9-verb-MI-style_beta.zip

And I've asked for a portuguese translation - so hopefully the next version won't only contain bug-fixes :)
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: abstauber on 26 Nov 2014, 21:46
Here's the next beta, including the portuguese translation - thanks Miguel :)
http://shatten.sonores.de/wp-content/uploads/2014/11/9-verb-MI-style_14_beta1.zip
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: Monsieur OUXX on 20 Apr 2015, 14:42
EDIT
There's something weird with the template: you need to do "Pick up" envelope to open it, and "open envelope" gives the default "it doesn't work" speech.
I noticed that this issue is also present in "Indiana Jone è l'orro di Genghis Khan", which uses the template I believe.

And I have to confess that the script is far too complex for me to spot if this is a bug related to the connection between the buttons and the actions (seriously: wow 8-0) or just a misuse of the cursor modes. Quick tests strongly suggest that there's a mixup between "open", "look at" and "use".

I used the template version shipped with AGS 3.3.0 RC1

EDIT : I've narrowed it down to two issues: one bug and one clumsy game design choice:
1) Template Bug: The "Pick up" action turns into the "use" action when clicking onto inventory items (it works fine otherwise). I don't know if it's only in the English template but the fact that an Italian game was impacted too suggests it's in every language.
2) Clumsy choice: The envelope cannot be opened using "Open". The player needs to use "Use"


============


EDIT: unrelated note: Here is the 9-verb template with all graphics re-imported as 32-bits and the default settings set to 32-bits / D3D9. DOWNLOAD FROM HERE (http://www.adventuregamestudio.co.uk/forums/index.php?topic=52052.msg636511804#msg636511804).
abstauber, I suggest that you correct the bug I mentionned then provide the latest version to AGS installer maintainers.

Notes:
- I've also reduced the number of frames for Beman's walkcycle, because it wasn't used in the demo game (and it was a pain to re-import all sprites one by one).
- I have based my work on the version that's included in 3.3.0 RC1, I have no idea if that's the same version as your latest version available for download in your latest post above.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: abstauber on 21 Apr 2015, 20:01
Quote
- I have based my work on the version that's included in 3.3.0 RC1
(http://lh4.ggpht.com/NgmqkelleJw8GYypJRPyo10HUnMZ7aR8YbkT8ZNXAQC9KLChDT-yGvOy9R4WGEuEUDpjs-ERNYx6kU9PKWDS9OAtAOsp=s0)
Y U NO TAKE THE RECENT VERSION?!
..and I just had to steal that meme ;)

Anyway, thanks for your work, I'll merge those in the next release. About the clumsy design choice: I agree that it's awkward but it exactly mimics the SCUMM behavior. I actually replayed MI2 to the prison cell to see how they handle envelopes. In SCUMM games you can just "use" and "look at" items (or give them away).
I'll see what I can do about the pick-up bug.

--edit:
I just browsed through the code and it seems like a design choice. Why would you want to pick something up that you already have in your inventory?
You can find it "on_mouse_click"
Code: Adventure Game Studio
  1.     //left click in inventory
  2.     else if (button==eMouseLeftInv) {
  3.       if (!isAction(eGA_GiveTo))ItemGiven= null;
  4.    
  5.       if (GlobalCondition (1)) {
  6.         // if the mouse is in the inventory and modes Walk or pickup are selected
  7.         SetAction (eGA_Use);
  8.  

Should we really be able to pick up  already taken inventory items?
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: Monsieur OUXX on 22 Apr 2015, 08:42
OK.
No, imho you can leave "pick up" as "use". It was just the combination of that with "open envelope" that utterly confused me, not to mention the same behavious I spotted in that Italian game which made it even more confusing (since I don't speak Italian, lol)
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: abstauber on 22 Apr 2015, 09:06
Alright, I keep things as they are and just incorporate the 32bit update.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: Monsieur OUXX on 22 Apr 2015, 09:13
and just incorporate the 32bit update.
Even that you don't need. After discussion with CW, it turns out there was a misunderstanding, and the priority was to upgrade the 8-bit sprites from the Default Game, not all non-32-bits sprites. 16-bits sprites are alright.
What you can do, though, is just to change the game defaults to 32-bits with Direct3D9. And if you do that I'd recommend re-importing the backgrounds.
Title: Re: TEMPLATE: 9-verb MI-style 1.3.2 - Last updade: 25th July 2014
Post by: Crimson Wizard on 10 Jun 2015, 10:05
Abstauber, I found a mistake in this module:
Code: Adventure Game Studio
  1. function EnterRoom(this Character*, int newRoom, int x, int y, eDirection dir, bool onWalkable) {
  2.   this.ChangeRoom(newRoom, x, y);
  3.   if (onWalkable) this.PlaceOnWalkableArea();
  4.   this.FaceDirection(dir);
  5. }
  6.  
The "onWalkable" parameter has no sense here, because room is changed only after the script finishes, and the player will be placed on walkable area in current room, not in the next one.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 01 Jul 2015, 13:41
Thanks for the heads up. I have fixed this among other things:

1.5    support for AGS 3.4
       added custom dialog rendering
       adapted eDirection to enum CharacterDirection (and removed eDir_none)
       fixed talk-to and pickup interactions on inv items

Since there are quite a few code changes, this might not yet be 100% stable.

Download
http://shatten.sonores.de/wp-content/uploads/2015/07/9-verb_MI-style_15_RC1.zip

PS: do you think it's a good idea to include custom dialog rendering?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 10 Jul 2015, 13:50
Well, since nobody joined the discussion, I suppose custom dialog rendering is alright :P

Also I've opened a github repo hoping that this makes it easier for CW to include the template in the main releases. Not to mention that bugs can be fixed directly in the repo :)

https://github.com/dkrey/ags_9verb_template/tree/master

Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: Crimson Wizard on 10 Jul 2015, 14:30
Also I've opened a github repo hoping that this makes it easier for CW to include the template in the main releases.
Frankly, it is easier for me when I may download ready template (*.agt) from somewhere.

Regarding the repository, I have an advice to not put any output files into repository. There is a number of reasons I could mention:
1) extra size;
2) you create a potential for inconsistent state where you may update source files (like script) but forget to update compiled game;
3) the output files are always built with particular version of AGS, while sources can be used by many different ones; so having executables there makes little sense;
4) since this is a source of template, not a real game, executables are not needed to anyone anyway.

I advise to re-create the repository from scratch and add only the files required to load and compile project, e.g. no temporary files, no output files.
(I say "re-create", because even if you delete exes from this one now, they will still be kept in commits history and take space; it will be easy to do because the repository is recently created)
To tell Git which files not to upload, edit ".gitignore" file in repository, adding names of such files or whole subdirectories, containing output (like "Compiled" and "_Debug").

Files you do not need in repository:
Compiled folder --- this is output
_Debug folder --- this is output
Game.agf.bak --- this is a temporary generated backup file, which you do not need because you use source control.
Game.agf.user --- these are generated user settings saved for each individual project location.
backup_acsprset.spr --- backup file
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 10 Jul 2015, 15:13
Hey, thanks for the advice.

About the .agt:
do you need two files: one for 3.3x and one compiled for 3.4x or can I stay lazy and just create an .agt with the recent stable version?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: cianty on 11 Jul 2015, 16:22
I just had a look at AGS 3.4.0.5 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=51050.0). There are a couple of problems with my (admittedly old version of) the template. I don't think there is a sensible way of upgrading and I was wondering how they were fixed in the latest version of the template.

FaceDirection
In 3.4.0.5 this function is introduced and it conflicts with the one from the template. I can easily just remove it from the template, but the problem is: I used this function all over my project and the enums differ. The template uses eDir_Up - 3.4 uses eDirection. I thought about using defines to fix this:
#define eDir_Up eDirectionUp

This will work for my project but only because I don't any of the other functions that use the direction enum, such as on_enter_room. The defines would break it for those calls.

ProcessClick
This function is no longer global as of 3.4.0.5. Instead use Room.ProcessClick. Fortunately there is a option in the Global Settings ("Enforce object-based scripting") that can be set to false to prevent this from breaking the entire guy script. But that's not a good solution for the future. Will the entire script have to be rewritten because of this? Is there a clever fix?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 11 Jul 2015, 19:38
Hey, first of all: hooray for deciding to continue on your game :cheesy:

ProcessClick That's indeed just changing everything in guiscript.asc to Room.ProcessClick

FaceDirection Here lies a bit more work ahead. First change the enum to:
Code: Adventure Game Studio
  1. // for compatibility reasons
  2. enum eDirection {
  3.   eDir_None  = 0,
  4.   eDir_Up    = eDirectionUp,
  5.   eDir_Left  = eDirectionLeft,
  6.   eDir_Right = eDirectionRight,
  7.   eDir_Down  = eDirectionDown
  8. };
  9.  

Now you need to change every function that includes eDirection (such as EnterRoom,GoToCharacter and so on) to the enum CharacterDirection. This goes for guiscript.ash as well as guiscript.asc

So for example:
Code: Adventure Game Studio
  1. import function EnterRoom(this Character*, int newRoom, int x, int y, eDirection dir);
  2.  
needs to be
Code: Adventure Game Studio
  1. import function EnterRoom(this Character*, int newRoom, int x, int y, CharacterDirection dir);
  2.  
That should do the trick.

Btw. a few month ago I migrated Aeronuts to the latest GUI and it wasn't such a big deal, the room files went completely untouched.
The only annoying part was that I had to put some effort in the options GUI. You should create a temp copy of your game and try it yourself. It really isn't that hard.

Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: cianty on 12 Jul 2015, 19:43
Thanks a lot for this little upgrade guide! I will definately follow it as soon as a stable version for 3.4 is released.

Maybe your guide will be interesting for others as well? Maybe it would be a good idea to link to it in the 3.4. release thread?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: tobulos1 on 14 Jul 2015, 19:59
Hi! Nice work on the template, appreciate it!
Although, I am receiving an error after the update:
Code: Adventure Game Studio
  1. guiscript.asc(1385): Error (line 1385): undefined symbol 'inventory'

Should be noted that I have just exported/imported the updated scripts to my current game.
Any thoughts?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 14 Jul 2015, 22:27
Hey, nice to see that there are still some 9 verb projects in the makeing :)
Could you please tell me the version of AGS you are currently using? Did you update AGS as well as the script?

At least in AGS 3.3.3 and AGS 3.4.0.5 the inventory array is still there, so I need some more info.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: tobulos1 on 15 Jul 2015, 05:47
Hey, nice to see that there are still some 9 verb projects in the makeing :)
Could you please tell me the version of AGS you are currently using? Did you update AGS as well as the script?

At least in AGS 3.3.3 and AGS 3.4.0.5 the inventory array is still there, so I need some more info.

Oh, of course! Sorry.
I updated the template and the editor to 3.3.4 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=52398.0). Should I try with 3.4.0.5?

Thanks!
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: Crimson Wizard on 15 Jul 2015, 10:00
Well, there are errors in this template :(.

Started fresh game with 1.5 RC1.

Quote
Dialog 0(36): Dialog has no option number 6
Dialog 0(37): The command 'return' will be ignored since the script for this option has already finished
Dialog 0(38): Dialog has no option number 7
Dialog 0(39): The command 'return' will be ignored since the script for this option has already finished
Dialog 0(40): Dialog has no option number 8
Dialog 0(41): The command 'return' will be ignored since the script for this option has already finished


Although, I am receiving an error after the update:
Code: Adventure Game Studio
  1. guiscript.asc(1385): Error (line 1385): undefined symbol 'inventory'

This is very strange. "inventory" is a built-in global variable, it must be there, unless its a bug in AGS.
Can you tell, what would happen if you try using this variable somewhere in your script?

Maybe trying "Rebuild All files" may help?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 15 Jul 2015, 10:43
Huge apologies for this one. To test scrolling in the dialog gui I added dummy dialog options and removed them afterwards. But unfortunately I forgot to remove the traces in the dialog script itself.

@tobulus1: your version is alright, I just wondered why the inventory array causes trouble. The so called undefined symbol is an internal AGS variable which us just being used by the template. If you upload the sources of your project and pm me the link, I could take a deeper look into it.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: tobulos1 on 16 Jul 2015, 13:36
This is very strange. "inventory" is a built-in global variable, it must be there, unless its a bug in AGS.
Can you tell, what would happen if you try using this variable somewhere in your script?

Maybe trying "Rebuild All files" may help?

Rebuilding all files didn't help, unfortunately :(

@tobulus1: your version is alright, I just wondered why the inventory array causes trouble. The so called undefined symbol is an internal AGS variable which us just being used by the template. If you upload the sources of your project and pm me the link, I could take a deeper look into it.

Do you want me to send you the whole script (e.g. from Pastebin) or anything else?

Btw, forgot to say this: when I double-click the error, it takes me to guiscript.asc, and it highlights the following line:
Code: Adventure Game Studio
  1. if (player.ActiveInventory==inventory[key]) {

In context, this is the whole block of code:
Code: Adventure Game Studio
  1. text, text...
  2.  
  3. else if (UsedAction(eGA_UseInv) && key>=0) {
  4.     if (any_click_move (x, y, dir)) {
  5.       if (player.ActiveInventory==inventory[key]) {
  6.         if (get_door_state(door_id)==1) {
  7.           if (!String.IsNullOrEmpty(get_door_strings("closefirst"))) player.Say(get_door_strings("closefirst"));
  8.         }
  9.         else if (get_door_state(door_id)==2) {
  10.           if (unlockDoorSound != null) chan = unlockDoorSound.Play();
  11.           if (!String.IsNullOrEmpty(get_door_strings("unlock"))) player.Say(get_door_strings("unlock"));
  12.           set_door_state(door_id, closevalue);
  13.         }
  14.         else if (get_door_state(door_id)==0) {
  15.           object[obj].Visible=false;
  16.           set_door_state(door_id, 2);
  17.           if (!String.IsNullOrEmpty(get_door_strings("relock"))) player.Say(get_door_strings("relock"));
  18.         }
  19.       }
  20.       else if (!String.IsNullOrEmpty(get_door_strings("wrongitem"))) player.Say(get_door_strings("wrongitem"));
  21.     }
  22.   }
  23.   else result=0;
  24.  
  25.   return result;
  26.   // 0 = unhandled
  27.   // 1 = handled
  28.   // 2 = NewRoom
  29. }

Here's the whole GUI script (asc) (http://pastebin.com/icP11FA9) and the GUI header (ash) (http://pastebin.com/zD79ZSh2).

EDIT: Again, I have only copied the template scripts + GUI over to a fresh blank project. The only thing I have modified are the sprite IDs in the script, since I'm using my own at the moment.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 16 Jul 2015, 20:35
Hmm... I just did the same and it compiled fine. I started up AGS 3.3.2 and used the older template included to create a demo game.
Then I pasted your two script files over and it still works. So assume, something else must be wrong - the script files are fine as it looks.

If it's not too much to ask, maybe you could upload your complete project somewhere and provide me a download link via PM.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: tobulos1 on 16 Jul 2015, 21:03
Hmm... I just did the same and it compiled fine. I started up AGS 3.3.2 and used the older template included to create a demo game.
Then I pasted your two script files over and it still works. So assume, something else must be wrong - the script files are fine as it looks.

If it's not too much to ask, maybe you could upload your complete project somewhere and provide me a download link via PM.

Sent you a PM with my project. Thanks for looking into it!
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: Crimson Wizard on 16 Jul 2015, 22:12
abstauber, could you upload a fixed version please? Thing is I included it to 3.3.4 installation. I will have to add a correct template to the package (or return the older version).
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC1 - Last updade: 1st July 2015
Post by: abstauber on 17 Jul 2015, 14:41
Most certainly! I just wanted to make sure that inventory bug isn't related to the template.

Here's the fixed version... and yes I tried to compile it this time without any last minute changes ;)
http://shatten.sonores.de/wp-content/uploads/2015/07/9-verb-MI-style_15_RC2.zip
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: Crimson Wizard on 21 Jul 2015, 10:06
Downloads
AGS 3.2 and later (compiled with AGS 3.3.3)
Most recent version:
http://shatten.sonores.de/wp-content/uploads/2015/07/9-verb-MI-style_15_RC2.zip

I found this template is compiled with 3.3.4, and it can be opened in 3.3.3, but not in 3.2.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: Crimson Wizard on 21 Jul 2015, 10:32
Alright, I found what was wrong with tobulos1's project.

Thing is that AGS does define "character", "inventory" etc arrays only if there are characters and inventory items, because it cannot declare array of 0 size.
To fix the problem, create at least 1 inventory item.

I will think how we may improve this to prevent such cases in the future.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: tobulos1 on 21 Jul 2015, 17:48
Alright, I found what was wrong with tobulos1's project.

Thing is that AGS does define "character", "inventory" etc arrays only if there are characters and inventory items, because it cannot declare array of 0 size.
To fix the problem, create at least 1 inventory item.

I will think how we may improve this to prevent such cases in the future.

Oh my, thank you! That certainly did the trick! I just had to create one inventory item and I was all set! Thank you so much Crimson :)
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: Crimson Wizard on 19 Aug 2015, 21:07
Abstauber, I found another bug: in older versions of this template chatacter would walk closer to another to talk to him. Now it starts conversation right away, from a distance.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: abstauber on 25 Aug 2015, 07:20
Hey CW,
this shouldn't be a bug. Earlier on in this thread a user complained about the default behavior you've described. So I added an option to control this.
Code: Adventure Game Studio
  1. //guiscript.asc
  2. bool approachCharInteract       = false;  // walk to character before starting interaction
  3.  

It's also mentioned in the changelog in guiscript.ash.

Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: Crimson Wizard on 25 Aug 2015, 09:34
Hey CW,
this shouldn't be a bug. Earlier on in this thread a user complained about the default behavior you've described. So I added an option to control this.
Oh, I see; well, that is a relief.
Although I would rather suggest to keep original behavior by default, because users will likely expect that.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: Crimson Wizard on 26 Aug 2015, 20:01
Found bug: for 3.4 version scrolling mouse wheel causes active option to be run.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 RC2 - Last updade: 1st July 2015
Post by: abstauber on 27 Aug 2015, 07:42
mea culpa (once again). I'll fix this right away.
edit:
Here's this fix until I'll upload the new version.

dialogscript.asc:
old
Code: Adventure Game Studio
  1.   info.RunActiveOption();
  2.  
new
Code: Adventure Game Studio
  1.   if (button != eMouseWheelSouth && button != eMouseWheelNorth) info.RunActiveOption();
  2.  
Title: Re: TEMPLATE: 9-verb MI-style 1.5 - Last updade: 3rd Sept. 2015
Post by: abstauber on 03 Sep 2015, 08:11
Okay, a few days have passed and no more new bugs have been discovered yet, I decided to call version 1.5 stable ;)

http://shatten.sonores.de/wp-content/uploads/2015/09/9-verb_MI-style_15.zip
The GitHub repo has also been cleaned up, thanks again for your input, CW.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 - Last updade: 3rd Sept. 2015
Post by: lucasio6 on 22 Oct 2015, 15:19
Hi there.

I have a question about the door system in the 9 verb template. I tried to follow the instructions of the 9Verbs.pdf manual but could not find an answer. (I am not actually making a game - I am just playing around.)

I set up 2 rooms and a door to connect the two rooms. However, only the door in room 1 works and I can't find out why the one in room 2 does not work. The gui correctly displays "open" when I point at the hotspot but nothing happens on right-click. Also, the default message is not displayed when I tell the CHAR to look at the hotspot.

Room 2 script:
Code: Adventure Game Studio
  1. // room script file
  2.  
  3. function room_FirstLoad()
  4. {
  5.  // close door on startup when entering the room (0 = closed; 1 = open; 2 = closed & locked)
  6.  set_door_state(21, 0);
  7.  init_object(21, oDoor.ID);
  8. }
  9.  
  10. function hDoor_AnyClick()
  11. {
  12.      if (any_click_on_door_special(21, oDoor.ID, 75, 175, eDir_Left, 1, 280, 260, eDir_Down, null, null, 4, 0)==0) Unhandled();
  13.      
  14. }
  15.  

I double checked that the hotspot is called 'hDoor' and the object is called 'oDoor'.

Thanks in advance for any suggestions.

Lucasio6
Title: Re: TEMPLATE: 9-verb MI-style 1.5 - Last updade: 3rd Sept. 2015
Post by: Monsieur OUXX on 22 Oct 2015, 16:27
the hotspot is called 'hDoor' and the object is called 'oDoor'.

(http://www.journaldugeek.com/wp-content/blogs.dir/1/files/2014/12/hodor-v2.png) Sorry I don't have the template's code with me right now. Will try to help later.
Title: Re: TEMPLATE: 9-verb MI-style 1.5 - Last updade: 3rd Sept. 2015
Post by: lucasio6 on 23 Oct 2015, 11:38
So I found the problem.

AGS did not (always) recognize/execute the script for the door hotspot in room 2 because I had not manually set the function in the 'events' tab for the hotspot. Instead, I had copied the script from room 1 to room 2 directly into the 'room script'. (roll)
Does this make sense?
Title: Re: TEMPLATE: 9-verb MI-style 1.5 - Last updade: 3rd Sept. 2015
Post by: Monsieur OUXX on 03 Nov 2015, 16:41
So I found the problem.

AGS did not (always) recognize/execute the script for the door hotspot in room 2 because I had not manually set the function in the 'events' tab for the hotspot. Instead, I had copied the script from room 1 to room 2 directly into the 'room script'. (roll)
Does this make sense?

Yes it does. Sorry for not being able to look into this.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last updade: 20th Nov. 2015
Post by: abstauber on 20 Nov 2015, 15:37
*Push*
New version. See the first post for details.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: LogicPort on 18 Feb 2016, 17:01
Hello is there an actual scene template using this, as I am having a lot of trouble integrating
this package? tyvm Note: I am trying to use this in the unity version for adventure Creator. It works
to a certain extent but I cannot figure out how to set it up properly. any help is appreciated.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: abstauber on 19 Feb 2016, 15:48
Are you sure,AGS templates work in unity? Nonetheless I've never worked with unity or AC itself, so I'm afraid I won't be any help.
What do you mean by this?
It works to a certain extent but I cannot figure out how to set it up properly
What parts of the template worked in AC?

Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: LogicPort on 19 Feb 2016, 16:31
(http://s22.postimg.org/j1ic6gy1d/9verbsac.jpg)
It works as far as displaying on the bottom, but I am having trouble figuring out how to set it all
up so that it actually works. I'm sure it is just my lack of knowledge of such. I get no hot spot info
when hovering nor anything happening.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: Crimson Wizard on 19 Feb 2016, 16:44
LogicPort, could you explain, how do you import AGS template into Adventure Creator (Unity)?
Is there any information by AC author(s) about importing AGS templates into their system?

For starters I would find out if AGS scripts can work in AC at all, because these scripts are backbone of the template.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: LogicPort on 19 Feb 2016, 17:23
Sure, if you look at the downloads page here:
http://www.adventurecreator.org/downloads
you will see the nine verbs unitypackage. unfortunately the doc that comes with it is very vague so I thought I would ask
here, i've also emailed the owner etc.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: Crimson Wizard on 19 Feb 2016, 17:27
Sure, if you look at the downloads page here:
http://www.adventurecreator.org/downloads
you will see the nine verbs unitypackage. unfortunately the doc that comes with it is very vague so I thought I would ask
here, i've also emailed the owner etc.

Oh I see. But that is AC Unity template package, not AGS template.

I mean, it would be nice if someone on those forums could help you, but just to make things clear: this forum thread here is dedicated to AGS template, which is, although similar in visual concept, is technically completely different thing, belonging to a different engine.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: Elvis Tanner on 05 Mar 2016, 16:46
This is an awesome template. Plus it's still getting updated by abstauber, that's very important.

Is there an easy way to change the default language? I want to write all text and dialogue in German while coding the game and add an English translation later. I'm not an expert with AGS. I understand I could replace all the GUI sprites and English lines in the Globalscript to German, but is there an easier way? Like switching a single variable for example? :) Thanks in advance!
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: abstauber on 06 Mar 2016, 20:57
"Maintained" is the right term ;) The template didn't get much new features the last few years - but on the other hand, it is also quite feature complete anyway.

Anyway regarding your question:
in guiscript.asc: set line 15 to eLangDE.

Code: Adventure Game Studio
  1. int lang = eLangDE;
That's all you need to do for now.
Once your game gets translated, your translators just need to translate GUI_LANGUAGE to the according language (e.g eLangEN eLangFR etc.) in the .trs file.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: kontakatilu on 28 Mar 2016, 20:22
Hi, i trying make a game using this template. It works great! But When i add items to my inventory, only shows items in the upper row, and the bottom row is empty and i need to change to the next page to show them in the first row... What im doing wrong? My screen resolution is 640x400. I add to guiscript.asc the lines: MainInv.ItemWidth=64; MainInv.ItemHeight=48;, because the items overlapping.

Sorry for my english :)
Thanks.

edit:

If i change MainInv.ItemHeight=47; the two rows of inventory works, buty second row need move down 1 pixel...

edit2:

I put MainInv.Height=96; and now works fine!
Title: Re: TEMPLATE: 9-verb MI-style 1.5.1 - Last update: 20th Nov. 2015
Post by: abstauber on 04 Apr 2016, 14:33
Sorry for the late reply (as always ;) ) and great to hear that you managed to solve it yourself.

I suppose, your item size is actually 96px? Oh, and you can also set the icon size inside the AGS editor itself. Click on 'Maingui' in GUIs (on the right), select the inventory area 'MainInv'. In the properties you can define the correct icon size.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.2 - Last update: 29th July. 2016
Post by: abstauber on 29 Jul 2016, 08:00
Added a bugfix and an option to disable the doubleclick support completely.
Thanks rmonic79 for the heads up.
http://shatten.sonores.de/wp-content/uploads/2016/07/9-verb-MI-style_152.zip
Title: Re: TEMPLATE: 9-verb MI-style 1.5.2 - Last update: 29th July. 2016
Post by: Monsieur OUXX on 22 Mar 2017, 16:12
Digging up thread for support :
I've imported that whole module into my own game, but the game starts with some cursor mode that I didn't have before (can't remember if it's usermode1 or usermode2).
Do these cursor modes have a special use in the module? Do I need them or can I just kick them out?
Title: Re: TEMPLATE: 9-verb MI-style 1.5.2 - Last update: 29th July. 2016
Post by: abstauber on 22 Mar 2017, 16:20
Both Usermodes are actually in use: WalkTo is Usermode2 and Open,Close,Push and Pull are Usermode1.
Could it possibly be that you are going to integrate this into 7 cities of gold? (roll)
Title: Re: TEMPLATE: 9-verb MI-style 1.5.2 - Last update: 29th July. 2016
Post by: Monsieur OUXX on 30 Mar 2017, 10:29
Both Usermodes are actually in use: WalkTo is Usermode2 and Open,Close,Push and Pull are Usermode1.
Could it possibly be that you are going to integrate this into 7 cities of gold? (roll)

Oooooooh, OK! That explains a lot.
I don't know if this was documented somewhere but I suggest you do, if only as comments (if i remember correctly, this module is on source control, so it shouldn't be too hard?).

Yes it will be integrated into 7coG. Our interface was rather powerful ( didn't make the original code base, but it was a good job), but I prefer your way of handling translations. And I expect that switch to make our code more maintainable (because it will mutualize the knowledge).

On a different note: what would you say if we turned the module object-oriented? How would we upload the updated version? If it's in ags git it's easy.

Another question: why did you duplicate the enum for user modes? (instead of having eModePull, etc. you have eGAxxx, etc.)
Title: Re: TEMPLATE: 9-verb MI-style 1.5.2 - Last update: 29th July. 2016
Post by: abstauber on 30 Mar 2017, 14:07
I don't know if this was documented somewhere but I suggest you do, if only as comments (if i remember correctly, this module is on source control, so it shouldn't be too hard?).
It's really not that obscure :P Have a peek at the lines 300+
But if you're beginning to work on the template anyway, feel free to add comments.

On a different note: what would you say if we turned the module object-oriented? How would we upload the updated version? If it's in ags git it's easy.
The template is maintained in a repo, but not the official AGS git. I usually call for CW, if the supplied template needs an update.
https://github.com/dkrey/ags_9verb-template

I didn't bother to create a struct (yet) because of compatibility reasons. For a complete rewrite I'd suggest to aim at version 2.0.
But the template is stable, documented and works fine so far. So I don't know if it's worth the effort.

Another question: why did you duplicate the enum for user modes? (instead of having eModePull, etc. you have eGAxxx, etc.)
Hm... I think it was done to be independent from mouse modes. So now your new interactions can all be mapped to Usermode1. The other modes are still there, because they are hardwired into AGS anyway. Users can choose if they want to handle everyting with an "otherclick" function and check for the verb there, or if they want to use the hardwired Talk/Use/Look/Interact functions.

Anyway, great to know that 7coG is on board :-D
Title: Re: TEMPLATE: 9-verb MI-style 1.5.3 - Last update: 29th July. 2016
Post by: Monsieur OUXX on 30 Mar 2017, 15:59
It's really not that obscure :P Have a peek at the lines 300+
I'm not the one working with it now :P I'm being helped by an texternal programmer who is rather new to AGS.

I don't know if it's worth the effort making the module OOP
The thing is that adding a struct to contain all the functions also works indirectly as a namespace. It's much easier to check straight away what comes from which module (we have a billion of them).

Another question: why did you duplicate the enum for user modes? (instead of having eModePull, etc. you have eGAxxx, etc.)
Hm... I think it was done to be independent from mouse modes.
Good point. That's what we want, as we will offer several GUIs depending on the hardware and on the user preferences.

Users can choose if they want to handle everyting with an "otherclick" function and check for the verb there, or if they want to use the hardwired Talk/Use/Look/Interact functions.
Well, we were doing that in our own system, but using the built-in mouse modes. So...

Anyway, great to know that 7coG is on board :-D
...And we're happy and grateful to be able to use powerful tools.  ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.5.4 - Last update: 21th April 2017
Post by: abstauber on 11 Apr 2017, 10:17
Here's a small update:

1.5.4  fixed label description
       Selected action is restored after unpausing the game

I already built the template with AGS 3.4.1 Beta3, but the code is completely backwards compatible. In fact the fixes are tiny: just open the global script, comment out lines 75 + 76 and you are done :)
Title: Re: TEMPLATE: 9-verb MI-style 1.5.4 - Last update: 11th April 2017
Post by: abstauber on 24 Apr 2017, 16:16
I'm currently rewriting this whole template.
The following would be great to know:
Is anyone actually using the door scripts or is it save to remove them?

Edit: Nevermind, I included it, but as a separate struct.
Title: Re: TEMPLATE: 9-verb MI-style 1.5.4 - Last update: 11th April 2017
Post by: Elvis Tanner on 27 Apr 2017, 13:38
I'm currently rewriting this whole template.
Good news! This is a great template and I'm using it for the game I currently work on, so thank you once again for maintaining it.

Are you rewriting it for better compatibility with newer versions of AGS or are you implementing new features? I'm asking because a "Keep-left-mouse-button-pressed-to-keep-character-walking" feature as seen in Thimbleweed Park would be really cool ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.5.4 - Last update: 11th April 2017
Post by: abstauber on 27 Apr 2017, 14:52
Thanks :)
I'm trying to recreate most features of Thimbleweed Park - I even bought the game for this purpose :D

Implemented features are:

But on a downside (for all upgraders) I took the liberty to restructure the whole module, so upgrading an existing game will be a huge task.
So if you just need the running feature, it might be easier to just backport it to the recent template.

I might also experiment with some kind of compatibility layer between the new struct and the old functions.

Title: Re: TEMPLATE: 9-verb MI-style 1.5.4 - Last update: 11th April 2017
Post by: Mehrdad on 27 Apr 2017, 15:24
Great Features!!!. I'm waiting for it  ;-D
Title: Re: TEMPLATE: 9-verb MI-style 1.6 - Last update: 2nd May 2017
Post by: abstauber on 02 May 2017, 10:59
Okies. I've backported the running option to this template 8-)
For this I had to change the cursor handling a little. In the previous versions of the template, when you clicked somewhere, the mouse cursor was hidden, until you the action was cancelled or done.
Now the mousecursor is shown the whole time. I checked back with SCUMM VM and I didn't find a case why the mouse cursor was hidden in the first place. It was only hidden during cutscenes. So in that case you would have to hide the cursor yourself.

I've also removed a code chunk from the rep_exec, since I had no idea why it was added in the first place.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.1 - Last update: 4th May 2017
Post by: abstauber on 04 May 2017, 10:18
Thanks to arj0n, we now have a dutch translation and a new release! :grin:

Title: Re: TEMPLATE: 9-verb MI-style 1.6.2 - Last update: 11th May 2017
Post by: abstauber on 11 May 2017, 14:45
Here's another release, mostly fixing running issues.

Oh and currently this thread the one with the most views ever in "Modules & Plugins" :=
Go verbs!
Title: Re: TEMPLATE: 9-verb MI-style 1.6.2 - Last update: 11th May 2017
Post by: WatchDaToast on 07 Nov 2017, 12:55
Hey, I hope it`s ok to bump this thread so I can ask something :D
I have been using this awesome template for a while to create my game, and only now have I stumbled across a little problem:
So far I could not find a way to make an on-screen object usable in the same way as an inventory item. So when you choose "Use" on that object,
the GUI will Show "Use Object with...", so I can use that object with another on-screen object.
I really have no idea how to achieve something like this. D:
It would be awesome if someone here could please help me out with this! :D
Title: Re: TEMPLATE: 9-verb MI-style 1.6.2 - Last update: 11th May 2017
Post by: Khris on 08 Nov 2017, 10:32
The template doesn't support this; you'll have to script it yourself.

A "simple" way (or rather workaround) would be to allow the player to take the object, but when they walk away too far, remove it from their inventory again with an appropriate message (using a region to trigger that).
Title: Re: TEMPLATE: 9-verb MI-style 1.6.2 - Last update: 11th May 2017
Post by: WatchDaToast on 27 Jan 2018, 10:18
It`s me again :grin: Thanks for your answer Khris, however I totally forgot to look around in here again as I was experimenting around with the problem I mentioned above.

I am having a new question here...
It seems to be the case that the player character automatically moves towards another character when "Talk To" is selected.
Is there a way to remove that? I am having a few situations in the game where to player is supposed to stand on his spot when he greets another character from the distance.

Edit:
I managed to accomplish what I envisioned by removing this in the GuiScript:
(https://78.media.tumblr.com/257803691828eb90e2d8fb3b94a53497/tumblr_p37tf1052k1rtk7t5o1_1280.png)

...and thus, turning it into this:
(https://78.media.tumblr.com/1645962c733d0b28e1e275e3baa65bc0/tumblr_p37tf1052k1rtk7t5o2_1280.png)

Did the same for the "GiveTo" command and the TalkTo-function that is called via right click.
Works fine so far, now that I can manually set the WalkTo-points in my scripts, however it feels kinda wrong to edit the template this way.
I hope there are no problems arising from this (wtf)
Title: Re: TEMPLATE: 9-verb MI-style 1.6.2 - Last update: 11th May 2017
Post by: Khris on 30 Jan 2018, 19:02
If you look at the start of the if block, right above the line you changed, you'll see that switching off the automatic approach is already available by setting approachCharInteract = false; at the top of guiscript.asc (together with a few other settings, like for instance the action bar's text color).

This also means that the change you made shouldn't have any unforeseen negative consequences since it has the exact same effect :)
Title: Re: TEMPLATE: 9-verb MI-style 1.6.2 - Last update: 11th May 2017
Post by: WatchDaToast on 02 Feb 2018, 13:33
Aah, so I could have just changed that instead. Good to know, thanks! ;-D
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 21 Jun 2018, 10:43
Here's a small bugfix release. I actually fixed this in the repo months ago, but forgot to compile a new template. So here it is :)
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 03 Jul 2018, 21:54
I'm trying to branch and/or create a pull request but it seems disabled in github. Have you disabled it for that project?

I don't think pulls are disabled, how do you do branching? Have you forked your own repository?
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Monsieur OUXX on 03 Jul 2018, 22:55
Issue I had with git:
1) cloned repo locally
2) using Git's local client interface, created a branch called "objectified"
3) Made changes
4) Commited changes (to local)
5) Tried to push changes --> it prompts me for my git credentials --> OK --> then it prompts me for some "git.com" credentials
   --> KO : It says "remote: Permission to dkrey/ags_9verb-template.git denied to jeancallisti. fatal: unable to access 'https://github.com/dkrey/ags_9verb-template.git/': The requested URL returned error: 403"

Note : 'jeancallisti' is my git account name.

EDIT: here is how I solved it :


- when I cloned abstauber's remote repo, I wasn't logged into git, I just took the URL as it appeared on the screen.
- because of that, the URL did not contain my username, but instead Abstauber's user name : https://github.com/dkrey/ags_9verb-template.git
- The clone and the first commit went perfect so I didn't even notice, but that url was still stored in .git/config
- I had to edit that file manually with the proper URL : https://github.com/jeancallisti/ags_9verb-template.git
- Now the push went fine and my fork is in my own remote repo.
- Off to the pull request!

https://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed

(phew, git is the only software I've ever encountered that's at the same time very straightforward and yet causing neverending confusion and human mistakes)
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 03 Jul 2018, 23:04
Repositories are of course protected against direct pushes by default, otherwise anyone could modify anyone's repository at will without asking.
You need to create your own remote to be able to push there, and then create pull requests for abstauber's.

Press "Fork" button at abstrauber's page: that will create your remote copy, under your github account. Then either clone your remote to your local machine and redo your changes there (and push).
or, if you know how to configure remotes in local github repository, you could just switch path and tell it to sync with your remote instead of abstauber's.

Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Monsieur OUXX on 04 Jul 2018, 13:54
Is the github repo up to date? 1.6.3 is from June 2018 but the repo shows last changes from 9 months ago.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 27 Jul 2018, 13:27
Yes, the repo is up to date, I just added the tag for 1.6.3 belatedly.
I am still pondering about your pull request though. I agree that it's not very elegant to define all the settings in one giant init function and your code clean up sure is nice. On the other hand it doesn't seem very user friendly or at least I'm a bit concerned that it's so complicated that it might put users off

So instead of this
Code: Adventure Game Studio
  1.     CDG.uparrow_img     = 124;
  2.     CDG.uparrow_xpos    = 137;
  3.     CDG.init();
  4.  

you have to do that
Code: Adventure Game Studio
  1.  
  2.   int spriteSettings&#91;] = CustomDialogGui.GetDefaultSettings_Sprites();
  3.   spriteSettings[eCustomDialog_uparrow_img] = 124; //custom sprite for up arrow
  4.   spriteSettings[eCustomDialog_uparrow_hi_img] = 137; //custom sprite for highlighted up arrow
  5.   CDG.ApplySettings_Sprites(spriteSettings); //apply the changes
  6.   CDG.init();
  7.  

And for every other settings group you need to create a new array. So what's the benefit apart from coding zen ;)
Anyone else has an opinion on this?

Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 27 Jul 2018, 13:39
I am still pondering about your pull request though. I agree that it's not very elegant to define all the settings in one giant init function and your code clean up sure is nice. On the other hand it doesn't seem very user friendly or at least I'm a bit concerned that it's so complicated that it might put users off
<...>
And for every other settings group you need to create a new array. So what's the benefit apart from coding zen ;)
Anyone else has an opinion on this?

I mentioned mine here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=56226.msg636589682#msg636589682
Monsieur OUXX also explained why he needs it there; idk if that's rational for everyone though.

My impression was that there must be a way to expose these variables as "property array" without having them as arrays internally. But I did not have spare time to try that idea out and make an actual example.

EDIT: What I mean by "property array", you could declare an attribute of array type like this (random example):
Code: Adventure Game Studio
  1. struct CustomDialog
  2. {
  3.     import attribute int IndexedOptions[];
  4. }
  5.  
And then implement like
Code: Adventure Game Studio
  1. int CustomDialog::geti_IndexedOptions(int index)
  2. {
  3.     if (index == 0) return dlg.background_color;
  4.     if (index == 1) return dlg.foreground_color;
  5. }
  6. void CustomDialog::seti_IndexedOptions(int index, int value)
  7. {
  8.     if (index == 0) dlg.background_color = value;
  9.     if (index == 1) dlg.foreground_color = value;
  10. }
  11.  
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Monsieur OUXX on 27 Jul 2018, 14:03
Yes, the core reason was to expose stuff. The thing in abstauber's module that's most likely to be changed immediately after importing are the sprites and other settings. Thzrefore I exposed that part.
Ultimately that allows to set up your game around the module without having to modify the module's code (that would not be a problem with other languages, but with AGS it's a nightmare to have to re-import and re-modify an imported third-party module every time it's modified by its creator).

for every other settings group you need to create a new array.
Well you need to do that only if you want to change the default settings. Otherwise that's zero extra code.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 27 Jul 2018, 14:08
Yes, the core reason was to expose stuff. The thing in abstauber's module that's most likely to be changed immediately after importing are the sprites and other settings. Thzrefore I exposed that part.
Ultimately that allows to set up your game around the module without having to modify the module's code (that would not be a problem with other languages, but with AGS it's a nightmare to have to re-import and re-modify an imported third-party module every time it's modified by its creator).

Well, one thing is exposing options which is a right way to do, but another is exposing them as arrays, and that was what I found unusual and potentially inconvenient.

I have a feeling that there might be other ways to enumerate these options on your own without changing them to arrays in the standard template.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 27 Jul 2018, 14:35
Ultimately that allows to set up your game around the module without having to modify the module's code (that would not be a problem with other languages, but with AGS it's a nightmare to have to re-import and re-modify an imported third-party module every time it's modified by its creator)

Manually editing the CDG.init() function was the never the intended way of using the module. All variables inside the CDG struct are accessible from everywhere, so you can modify the dialog GUI from every script below the dialog script. So if you do the setup in game_start inside the globalscript (like you do now), you still will be fine, even if the module code changes.

To be honest, the best way of handling / designing custom dialogs would be inside the AGS Editor :P
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Monsieur OUXX on 30 Jul 2018, 18:51
All variables inside the CDG struct are accessible from everywhere, so you can modify the dialog GUI from every script below the dialog script.

Yes, but I don't want to change the global variables anywhere in the code. I want to pass the global variables to that module only once, and then change the variables defined in that module, only in my one custom script that initializes that module.
Moreover, that's only 1/4 of what my changes do :
1) they make the things accessible from outside (your answer addresses this, and I accept it)
2) they group the settings by category
3) they make them reflexive (accessible by index or name in the array of settings, allowing to tie them to an in-game console system)
4) they clarify the initialization sequence and keep the object in a consistent state (by letting you change a few settings and then calling the corresponding function in the module to apply them, instead of changing some variables values directly and then not being sure of what should be done for the change to be taken in account, or if something was broken).

More generally, I'd say that you guys have no mercy ;-D for people who build huge huge systems around your modules, because you don't perceive how much the smallest hesitations on the scripter's side ends adding up to lots of time wasted ("wait -- Did I change this setting myself or was it always like that? Should this module come before or after that other module? Damn there's an update. Is this new value meant to be overwritten by the custom value I used 2 years ago? I don't remember." etc.)
So anyways, at this stage I've explained why I went for those changes, that was my attempt at making your module more sealed from the rest of the code. So it's only my ego that keeps talking, there's no point in trying to convince you.
Thanks for taking the time of answering! See you around guys.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 30 Jul 2018, 19:17
@Monsieur OUXX, These are valid points, actually, I don't know why you think that there is no point in trying to convince... I've automatically agreed to most of what you've said before, but I am not the template's author. Can't say for abstauber, but as I kept repeating my only confusion was about arrays part.

3) they make them reflexive (accessible by index or name in the array of settings, allowing to tie them to an in-game console system)
But could not this be also done without modifying the template itself (or rather - without having arrays inside abstauber's module itself, since there could be improvements of other sort)? I've shown an example of indexer property above, you could do this as a wrapper around abstauber's module, and even have these properties accessed by a string if you prefer. This way there will be two optional ways to access these settings: via strongly typed variables/attributes, and via custom indexer attribute(s).

Furthermore, with such approach you will have greater control, because if module changes with new update, you may still keep old order of variables in the indexer if you need one (e.g. in case you were saving these to the ordered list in file).

4) they clarify the initialization sequence and keep the object in a consistent state (by letting you change a few settings and then calling the corresponding function in the module to apply them, instead of changing some variables values directly and then not being sure of what should be done for the change to be taken in account, or if something was broken).
This problem is because majority of the classic modules and templates are written in "C-style" (which is actually not real "C-style", but rather "bad C-style"), where many variables are just left public. Normally they should be hidden behind Set/Get functions or properties (attributes in AGS), which are get/set functions too internally. And when SetX function is called, it should've taken the setting change into account (or at least user could presume it does).
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Snarky on 31 Jul 2018, 09:07
What I mean by "property array", you could declare an attribute of array type like this (random example):
Code: Adventure Game Studio
  1. struct CustomDialog
  2. {
  3.     import attribute int IndexedOptions[];
  4. }
  5.  
And then implement like
Code: Adventure Game Studio
  1. int CustomDialog::geti_IndexedOptions(int index)
  2. {
  3.     if (index == 0) return dlg.background_color;
  4.     if (index == 1) return dlg.foreground_color;
  5. }
  6. void CustomDialog::seti_IndexedOptions(int index, int value)
  7. {
  8.     if (index == 0) dlg.background_color = value;
  9.     if (index == 1) dlg.foreground_color = value;
  10. }
  11.  

Wait, can you actually do this in AGS script, or is this just something that ought to be possible? I never knew about this, if it's possible! Way cool!

This problem is because majority of the classic modules and templates are written in "C-style" (which is actually not real "C-style", but rather "bad C-style"), where many variables are just left public. Normally they should be hidden behind Set/Get functions or properties (attributes in AGS), which are get/set functions too internally. And when SetX function is called, it should've taken the setting change into account (or at least user could presume it does).

Yeah, but on the other hand, in the SpeechBubble module, more than half the code is just getters and setters for the various attributes. 8-0

If you're not actually doing any logic in them (I'm doing this whole inheritance system, which is part of the reason it takes up so many lines), just setting and returning an underlying variable, there's really no benefit: it just takes up space in the module, makes the code harder to skim, is a potential source of bugs (if, for example, you copy-paste the getters and setters and miss one of the variables that need to be changed), and adds a little bit of execution overhead.

You can replace a variable with an identically named attribute later on without changing any of the code that calls it (one of the great benefits of properties/attributes over getter/setter functions), so you might as well leave them as plain public member variables until you actually have any need for special handling.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 31 Jul 2018, 09:21
@Monsieur OUXX:
First of all, I really appreciate that you share your hard work with us/me and it's quite educational how you did things.
That said, I do not understand why you haven't refactored the fully fledged dialog module instead (http://www.adventuregamestudio.co.uk/forums/index.php?topic=36313.0) :confused:
If I accept your pull request now I'm in the delicate position that I have to apply all your changes to the parent module at some point.

Btw. because of this problem I usually do not integrate 3rd party modules in my templates. For the dialog GUI I made an exception because the default dialog in AGS is very very basic.
Also if I accept the pull request, it would make sense to apply these changes to the GUI script itself. This would as well be a major task and the new settings array doesn't help code-readability either.

Another thing is the refactored module still has around 13 options left which are not covered by the settings array - correct me if I'm wrong.
Edit: The function dropdown in the AGSEditor is also broken in your version of the customdialoggui.asc.

But enough of that... my main point is: if we change the way how variables are assigned, let's do it for the whole template.
I agree with Snarky: adding dozens of setters and getters (I know this from some if my modules too) blows up the code a lot. I like CW's approach, just with an enum instead of plain index numbers. But what difference makes " import attribute int " instead of a regular import?
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Snarky on 31 Jul 2018, 10:02
I agree with Snarky: adding dozens of setters and getters (I know this from some if my modules too) blows up the code a lot. I like CW's approach, just with an enum instead of plain index numbers. But what difference makes " import attribute int " instead of a regular import?

Regular imports are just for functions: You don't import a member variable into a struct, you just declare it, and it gets added to that struct's data schema (so for every instance of the struct, you have to allocate that amount of memory to store it). Attributes, on the other hand, create properties that look like variables from the outside.

Declaring something as an attribute import means that it's "not a real variable": it's a function or functions called accessors (the getters and setters) pretending to be a variable. Functions aren't stored with the struct data, so they take up no additional space for each instance. Normally the important thing is that you can perform processing when you set the value, such as validation or updating other dependent data, and that you can store the data in a single, canonical representation but access it in alternative forms that are simply generated on demand (for example getting the right-edge coordinate of an object by adding the left-edge coordinate and the width, rather than storing it redundantly).

For properties that are regular variable types this is fairly routine, but I didn't know you could (in AGS) also write accessors that pretend to be not just a variable but an array of variables.

Sorry if this seems patronizing, you probably knew most of it already, but I wasn't sure exactly what part of it had you confused.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 31 Jul 2018, 10:39
Wait, can you actually do this in AGS script, or is this just something that ought to be possible? I never knew about this, if it's possible! Way cool!

This is how several array-like attributes are done, like Game.AudioClips, System.AudioChannels etc, you've been using these all along.

The attributes are still not documented inside the manual itself, there is only this slightly outdated wiki article: http://www.adventuregamestudio.co.uk/wiki/Keyword:_attribute
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 31 Jul 2018, 13:45
Sorry if this seems patronizing, you probably knew most of it already, but I wasn't sure exactly what part of it had you confused.
Not at all, this was quite insightful. Although I have to admit that in the end the wiki article did the trick of me fully understanding what attributes do in AGS :)

But since the wiki article mentions it: will this scripting feature still be supported in the future? I sure hope so ;)
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: Crimson Wizard on 31 Jul 2018, 13:55
But since the wiki article mentions it: will this scripting feature still be supported in the future? I sure hope so ;)

Like I said, the article is bit outdated, and attributes are fully supported and should not be abandoned.
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 31 Jul 2018, 16:58
Many thanks! I've refactored the Tumbleweed template to use attributes now. But I won't do it with this template as I'd really like users to switch to the newer template and this one has not been refactored at all.

Maybe it would have been smarter to call the Tumbleweed Template "9-verb MI-Style 2.0" :-\
Title: Re: TEMPLATE: 9-verb MI-style 1.6.3 - Last update: 21th June 2018
Post by: abstauber on 01 Aug 2018, 15:32
@Monsieur OUXX
Have a look over here:
https://github.com/dkrey/ags_tumbleweed/blob/master/dialogscript.asc
https://github.com/dkrey/ags_tumbleweed/blob/master/dialogscript.ash

1) they make the things accessible from outside
check

2) they group the settings by category
I decided against individual arrays for each category of settings, as I find this a bit too confusing when setting up a new GUI. The options are still somehow categorized by the attribute name.

3) they make them reflexive (accessible by index or name in the array of settings, allowing to tie them to an in-game console system)
check

4) they clarify the initialization sequence and keep the object in a consistent state

err... 1/2 check? The initialization is done by the internal AGS functions. There is no needed sequence or order for the options to be set. Also the whole dialog GUI is now static.

And as said before: this won't make it into this template. But since the module doesn't have dependencies, you should have no problems importing the code from Tumbleweed Verbs.