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.4
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.3 P1
(scripts are compatible with AGS 3.2 and later)
http://shatten.sonores.de/wp-content/uploads/2019/04/9-verb-MI-style_1.6.4.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
1.6.4 Option GUI wasn't translated if English is not set as default language
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
Excellent! :)
If this template proves to be stable, would you be happy with it being included in AGS 3.2?
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.
*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?
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?
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.
Yep, an HTML version would be useful, saves people having to install OpenOffice just to read the docs :)
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?
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. :)
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... :)
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.
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?
How easily is this adapted to a higher resolution AGS game? The new AGS supports 1024x768 resolution doesn't it?
Quote from: skerrigan on Fri 12/02/2010 14:49:27
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.
String clearToSpace(String text) {
int p=0;
// ignore white spaces at the beginning
while (p<text.Length && text.Chars[p]==' ') {
p++;
}
// write white spaces until next white space
while (p<text.Length && text.Chars[p]!=' ') {
text=text.ReplaceCharAt(p, ' ');
p++;
}
return text;
}
Whoops, I didn't know that this might be a problem. I'll take a look at it this evening and keep you updated.
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:
if (System.ScreenWidth==320)
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");
else if (System.ScreenWidth==640)
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");
to this
if (System.ScreenWidth==320)
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");
else
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");
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.
: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!!!
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 ;)
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.
Well you could do it like this:
if (UsedAction(eGA_Open) || UsedAction(eGA_Close))
{
if (MovePlayer(640, 420)!=0) cEgo.Animate(2, 2 , eOnce, eBlock, eForwards);
}
if (any_click_on_door_special(0, oDoor.ID, 640, 420, eDir_Right, 2, 180, 88, eDir_Right, 0, 0, 4, 0)==0) Unhandled();
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.
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.
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 :)
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.
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!
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.
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. :)
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)
Quote from: cianty on Fri 17/09/2010 08:57:51
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.
Quote from: cianty on Fri 17/09/2010 08:57:51
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 :)
Quote from: cianty on Fri 17/09/2010 08:57:51
yay, that's my current game
Yay :D
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).
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... :-[
@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.
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.
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.
Quote from: abstauber on Tue 28/09/2010 11:40:19I 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).
Quote from: cianty on Tue 28/09/2010 15:18:44
Quote from: abstauber on Tue 28/09/2010 11:40:19I 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
Prog's roger is no match for CJ's talent.
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...
Abstauber what a great find. :D Roger never looked so cool. ;)
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
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
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:
function oMyObject_AnyClick()
{
player.Walk(X,Y, eBlock, eWalkableAreas);
if(UsedAction(eGA_LookAt)) {
player.Think("It's my object.");
}
else if(UsedAction(eGA_Use)) {
player.Think("I can't touch this - daa da da daaa.");
}
else Unhandled();
}
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.
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.
I am happy to be of service! There's a lot to be learned on these forum, but only if questions are asked.
Cheers!
If you use the build-in function MovePlayer, you can also get rid of the blocking movement. That's even more SCUMM-esque :)
function oMyObject_AnyClick()
{
if (MovePlayer(X, Y)) {
if(UsedAction(eGA_LookAt)) {
player.Think("It's my object.");
}
else if(UsedAction(eGA_Use)) {
player.Think("I can't touch this - daa da da daaa.");
}
else Unhandled();
}
}
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.
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?
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.
Quote from: Khris on Thu 21/10/2010 22:15:59
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.
So, what effect do you want to achieve? Maybe there's an easier way.
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
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. :)
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?
Quote from: Khris on Fri 22/10/2010 19:26:32
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.
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!!
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
...
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!!!
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.
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!!!
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.
// English
OptionsTitle.Text = "Options";
OptionsMusic.Text = "Music Volume";
OptionsSound.Text = "Sound Effects ";
OptionsSpeed.Text = "Game Speed";
OptionsDefault.Text = "Default";
OptionsSave.Text = "Save";
OptionsLoad.Text = "Load";
OptionsRestart.Text = "Restart";
OptionsQuit.Text = "Quit";
OptionsPlay.Text = "Resume";
gPausedText.Text = "Game Paused. Press Space to Continue";
RestoreTitle.Text = "Please choose a game to load";
RestoreCancel.Text = "Cancel";
SaveTitle.Text = "Please enter a name";
SaveOK.Text = "Save";
SaveCancel.Text = "Cancel";
gConfirmexitText.Text = "Are you sure, you want to quit? (Y/N)";
gRestartText.Text = "Are you sure, you want to restart? (Y/N)";
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 ;)
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...
There are two ways:
You can set character clickable in the editor.
or use
cEgo.clickable = true;
somewhere in the script.
Thanks. I put that line in Game_start and it works now! :D
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?
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.
Thanks a lot, Abstauber! I'll look into that tonight.
EDIT: Again, many thanks, Abstauber! It worked perfectly!
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)
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...
Quote from: Ghost on Wed 22/12/2010 19:33:21
If Abstauber did this numbering in-scipt, though...
Nope, the general settings are the ones to look at :)
Also there's an option to decide whether to show the GUIs during spoken dialog or to hide them. That would not be exactly what you're looking for but a start.
:) :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.
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?
// Spanish
OptionsTitle.Text = "Opciones";
OptionsMusic.Text = "Volumen de la música";
OptionsSound.Text = "Efectos de sonido ";
OptionsSpeed.Text = "Velocidad de juego";
OptionsDefault.Text = "Valores por defecto";
OptionsSave.Text = "Guardar";
OptionsLoad.Text = "Cargar";
OptionsRestart.Text = "Reiniciar";
OptionsQuit.Text = "Salir";
OptionsPlay.Text = "Volver";
gPausedText.Text = "Juego en pausa. Pulsa Espacio para continuar";
RestoreTitle.Text = "Por favor, elige el juego a cargar";
RestoreCancel.Text = "Cancelar";
SaveTitle.Text = "Por favor, introduce un nombre";
SaveOK.Text = "Guardar";
SaveCancel.Text = "Cancelar";
gConfirmexitText.Text = "¿Seguro que quieres salir? (S/N)";
gRestartText.Text = "¿Seguro que quieres reiniciar? (S/N)";
Ooops completely forgot about that.
Or did I send you my work in progress, abstauber? I can't remember.
@Unai:
Thanks for your help. I already have the verbs from josemarg, so now only the verb translation is open, which I completely forgot.
if (action == eMA_WalkTo) tresult="Go to %s";
else if (action == eGA_LookAt) tresult="Look at %s";
else if (action == eGA_TalkTo) tresult="Talk to %s";
else if (action == eGA_GiveTo) {
if (item.Length>0) tresult="Give !s to %s";
else tresult="Give %s";
}
else if (action == eGA_PickUp) tresult="Pick up %s";
else if (action == eGA_Use) {
if (item.Length>0) tresult="Use !s with %s";
else tresult="Use %s";
}
else if (action == eGA_Open) tresult="Open %s";
else if (action == eGA_Close) tresult="Close %s";
else if (action == eGA_Push) tresult="Push %s";
else if (action == eGA_Pull) tresult="Pull %s";
else tresult=" ";
@Monsieur OUXX
Nope, nothing here yet. But it would still be cool if you could send me something ;)
Hey, could you answer the Default question? :D
QuoteWhat is "Default" for? Is it a verb? Or an adjective? Is it something like "Return to default values"?
The other code
if (action == eMA_WalkTo) tresult="Ir a %s";
else if (action == eGA_LookAt) tresult="Mirar %s";
else if (action == eGA_TalkTo) tresult="Hablar con %s";
else if (action == eGA_GiveTo) {
if (item.Length>0) tresult="Dar !s a %s";
else tresult="Dar %s";
}
else if (action == eGA_PickUp) tresult="Coger %s";
else if (action == eGA_Use) {
if (item.Length>0) tresult="Usar !s con %s";
else tresult="Usar %s";
}
else if (action == eGA_Open) tresult="Abrir %s";
else if (action == eGA_Close) tresult="Cerrar %s";
else if (action == eGA_Push) tresult="Empujar %s";
else if (action == eGA_Pull) tresult="Estirar de %s";
else tresult=" ";
I saw josemarg used Estirar instead of Tirar like Lucasarts games did. Good choice, Tirar means both Pull and Throw in spanish and I remember having Indy trying to throw every object in the game until suddenly... he pulled a bookshelf :D
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.
Ok, I edited my original post with that, "Valores por defecto" which means Default values
Is it too long?
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);
}
}
}
}
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.
Quote from: abstauber on Fri 14/01/2011 15:21:36
@Monsieur OUXX
Nope, nothing here yet. But it would still be cool if you could send me something ;)
Will do.
I got interrupted by Christmas holidays, and now I don't have photoshop anymore.... Which is a major obstacle :D I'll find a way.
@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:
//left click in inventory
else if (button==eMouseLeftInv) {
if (!isAction(eGA_GiveTo))ItemGiven= null;
if (GlobalCondition (1)) {
// if the mouse is in the inventory and modes Walk or pickup are selected
SetAction (eGA_Use);
location=GSinvloc;
if (Extension()=='u' && ii.IsInteractionAvailable(eModeInteract)) {
// use it immediately (not with anything else)
used_action=global_action;
ii.RunInteraction(eModeInteract);
SetAction(eMA_Default);
}
///// HERE'S THE CHANGE /////
else
{
SetAction (eGA_LookAt);
used_action=global_action;
ii.RunInteraction(eModeLookat);
SetAction(eMA_Default);
//player.ActiveInventory=ii;
}
///// HERE'S THE CHANGE /////
}
So in detail, the line
player.ActiveInventory=ii;
is changed to
else
{
SetAction (eGA_LookAt);
used_action=global_action;
ii.RunInteraction(eModeLookat);
SetAction(eMA_Default);
//player.ActiveInventory=ii;
}
(don't forget the braces)
With this change you can still use the "use-extension" for inventory items, like the magic envelope when Guybrush gets arrested on Phatt Island.
@Monsieur OUXX:
Don't worry, I've got all day :)
Quote from: abstauber on Mon 17/01/2011 13:12:37
@Unai:
Way too long, one button can only hold up to 9 characters ;)
Maybe you could fire up an old scumm game (native, not ScummVM) and check how they translated it.
Ok, so what about "Restaurar"? It means Restore, i think it's pretty self explanatory :D
Extra question:I haven't tried the template yet, and maybe is somehow clear when I open it in AGS, but... what size do the backgrounds need to be to use your GUI? From screenshots it looks like 139px for a 320px resolution, but the number is a bit weird...
Quote from: Unai on Mon 17/01/2011 13:27:24
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 ;)
Quote from: Unai on Mon 17/01/2011 13:27:24
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.
Quote from: abstauber on Mon 17/01/2011 13:54:21
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
Quote from: Unai on Mon 17/01/2011 14:04:47
¡¡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"
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
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 ;)
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!
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.
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?
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.
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!
Ohhh, I really like Restablecer, but still doesn't fit, since it's 11 characters long! Argg!!
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.
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=esl=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)
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
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.
It's actually some kind oh phrasal verb problem:
Tirar = Throw
Tirar de = Pull
Quote from: Unai on Tue 18/01/2011 22:34:43
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.
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.
Ok, I agree poplamanopla has a point. Tirar is the classic Lucasarts word for Pull, so... ::)
"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
Quote from: Unai on Tue 18/01/2011 22:34:43
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)
Quotewould 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?
"Cfg Dfcto" ?? (Configuración por defecto)
"CfgOrigen" (Configuración origen) <- Not very correct
OMG, all this trouble for a single button... :p
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)
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;
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.
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!
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?
Scrolling dialogs, eh?
Well, I'm afraid you've to master another module ;)
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36313.0
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?
perfectly done! u are the best :)
@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 ;)
Quote from: abstauber on Thu 27/01/2011 20:06:12
@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..
Doesn't this piece of code take care of it?
function game_start() {
String tr_lang;
// --- translate GUI action buttons ---
tr_lang = GetTranslation("GUI_LANGUAGE");
tr_lang = tr_lang.LowerCase();
if (tr_lang == "de") {
lang = eLangDE;
}
else if (tr_lang =="es") {
lang = eLangES;
}
else if (tr_lang =="fr") {
lang = eLangFR;
}
else if (tr_lang =="en") {
lang = eLangEN;
}
.....
GUI_LANGUAGE appears in the .trs file and needs to be set to the according language
Quote from: abstauber on Fri 28/01/2011 11:37:17
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?
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.
Quote from: abstauber on Fri 28/01/2011 12:10:31
or wait:
HA! YOU SUCK!
Hehe, ok, that makes more sense. Bottom line is : Great module!!!
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...
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?
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?
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?
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 :)
i'l try.
in the default template that didn't happen
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 :)
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
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 ;)
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;
}
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 :)
Awesome! Thanks a lot! :)
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?
???
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.
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.
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 :)
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?
Quote from: SN1984jm on Fri 13/05/2011 18:59:01
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.
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?
updated with picture
sorry if this is considered a double post
If you select the slider in AGSEdit, what does it say for MaxValue and MinValue?
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.
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():
#ifver 3.2
OptionsSldMusic.Min = 0;
OptionsSldMusic.Max = 100;
OptionsSldSound.Min = 0;
OptionsSldSound.Max = 100;
#endif
#ifnver 3.2
OptionsSldMusic.Min = -3;
OptionsSldMusic.Max = 3;
OptionsSldSound.Min = 0;
OptionsSldSound.Max = 255;
#endif
And at the start of OptionsDefault_OnClick:
#ifver 3.2
OptionsSldMusic.Value = 80;
OptionsSldSound.Value = 90;
#endif
#ifnver 3.2
OptionsSldMusic.Value = 2;
OptionsSldSound.Value = 230;
#endif
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.
int
ActionLabelColorNormal = 15219, // colour used in action bar
ActionLabelColorHighlighted = 38555, // highlighted colour used in action bar
invUparrowONsprite = 124, // sprite slot of the upper inv arrow / normal
invUparrowOFFsprite = 154, // sprite slot of the upper inv arrow / disabled
invUparrowHIsprite = 137, // sprite slot of the upper inv arrow / highlighted
....and so on...
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
SetActionButtons(eGA_GiveTo, "a_button_give 0 125 138 Qq");
SetActionButtons(eGA_PickUp, "a_button_pick_up 1 126 139 Ww");
SetActionButtons(eGA_Use, "a_button_use 2 127 140 Ee");
SetActionButtons(eGA_Open, "a_button_open 3 129 142 Aa");
SetActionButtons(eGA_LookAt, "a_button_look_at 4 134 147 Ss");
SetActionButtons(eGA_Push, "a_button_push 5 131 144 Dd");
SetActionButtons(eGA_Close, "a_button_close 6 133 146 Zz");
SetActionButtons(eGA_TalkTo, "a_button_talk_to 7 130 143 Xx");
SetActionButtons(eGA_Pull, "a_button_pull 8 135 148 Cc");
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
import int lang;
This is the new game_start function.
function game_start() {
String tr_lang;
// --- translate GUI action buttons ---
tr_lang = GetTranslation("GUI_LANGUAGE");
tr_lang = tr_lang.LowerCase();
if (tr_lang == "de") {
lang = eLangDE;
}
else if (tr_lang =="es") {
lang = eLangES;
}
else if (tr_lang =="fr") {
lang = eLangFR;
}
else if (tr_lang =="en") {
lang = eLangEN;
}
else if (tr_lang =="it") {
lang = eLangIT;
}
AdjustLanguage();
// --- Set default Door strings (Look, locked and wrong item)
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.");
// --- initialize game settings ---
SetDefaultAction(eMA_WalkTo);
set_double_click_speed(GetGameSpeed()/4);
// --- set the pixel gap for listbox items according to the screen res
if (System.ScreenWidth<640) listBoxGap = 2;
else listBoxGap = 4;
}
That should do the trick.
@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.
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
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
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.
Quote from: LeKhris on Thu 27/10/2011 09:31:22
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?
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.
function room_FirstLoad()
{
set_door_state(1, 0);
init_object(1, oVoodooDoor.ID);
}
and
function hVoodooDoor_AnyClick()
{
if (any_click_on_door (1, oVoodooDoor.ID, 470, 182, eDir_Right, 2, 456, 186, eDir_Right)==0) Unhandled ();
}
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?
My character walks right up to the point in the code then he just stops, and nothing else happens.
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.
I would LOVE to upload it, it's just that I don't know how. :-[
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 :)
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.
Found the error, for some reason, the GoTo command in your guiscript is broken.
guiscript.asc, line 702:
if (blocking==0) player.Walk(xtogo, ytogo);
else if (blocking==0) {
player.Walk(xtogo, ytogo, eBlock);
arrived=0;
}
else if (blocking==0) arrived=MovePlayer(xtogo, ytogo);
has to be
if (blocking==0) player.Walk(xtogo, ytogo);
else if (blocking==1) {
player.Walk(xtogo, ytogo, eBlock);
arrived=1;
}
else if (blocking==2) arrived=MovePlayer(xtogo, ytogo);
Yup. That did it. Thanks a bunch. ;D
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.
Quote from: abstauber on Wed 29/05/2013 10:42:36
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"
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:
#ifdef STRICT_AUDIO
#define USE_OLD_AUDIO // comment this line if you want this template essential functions use only new style audio
#endif
Aw, it's down again? I seriously need to find a different provider. Almost every sunday it crashes with no cron-jobs involved...grr.
Quote from: Crimson Wizard on Mon 01/07/2013 13:50:25
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.
Quote from: Crimson Wizard on Mon 01/07/2013 13:50:25
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
I never paid attention to this before, but there's a Walk Behind mask in the first room, looking like a rope bridge shape.
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
Quote from: abstauber on Mon 08/07/2013 14:06:41
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)
Wow, so this survived since Proskritos first release in 2006?! Now I almost feel bad that I removed it :)
Also - stunning game guessing skills :)
Quote from: abstauber on Mon 01/07/2013 14:11:30I'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
Quote from: abstauber on Mon 01/07/2013 14:11:30Still 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?
// (1) defined a new VALUED macro, enum, or readonly boolean which the user can edit at design-time
#define USE_OBJECT_ORIENTED_AUDIO true
enum ModuleAudioSettings
{
USE_OBJECT_ORIENTED_AUDIO = true
};
readonly bool USE_OBJECT_ORIENTED_AUDIO = true; // could also be writeprotected property or readonly attribute of struct
// (2) defined a new VALUED macro or enum which is based on STRICT_AUDIO
#ifdef STRICT_AUDIO
#define USE_OBJECT_ORIENTED_AUDIO true
#endif
#ifndef STRICT_AUDIO
#define USE_OBJECT_ORIENTED_AUDIO false
#endif
enum ModuleAudioSettings
{
USE_OBJECT_ORIENTED_AUDIO =
#ifdef STRICT_AUDIO
true,
#endif
#ifndef STRICT_AUDIO
false,
#endif
};
readonly bool USE_OBJECT_ORIENTED_AUDIO =
#ifdef STRICT_AUDIO
true;
#endif
#ifndef STRICT_AUDIO
false;
#endif
// (3) defined a new UNvalued macro based on STRICT_AUDIO
#ifdef STRICT_AUDIO
#define USE_OBJECT_ORIENTED_AUDIO
#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:
// some_func
if (USE_OBJECT_ORIENTED_AUDIO)
{
aSound.Play();
}
else
{
PlaySound(1);
}
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.
if (USE_OBJECT_ORIENTED_AUDIO)
{
// if STRICT_AUDIO is true this branch is run and compiles fine
// if STRICT_AUDIO is false this branch is ignored but compiles fine
aSound.Play();
}
else
{
// if STRICT_AUDIO is true this branch won't compile
// if STRICT_AUDIO is false this branch is run and compiles fine
PlaySound(1);
}
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:
#ifdef USE_OBJECT_ORIENTED_AUDIO
aSound.Play();
#endif
#ifndef USE_OBJECT_ORIENTED_AUDIO
PlaySound(1);
#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...
Quote from: monkey_05_06 on Mon 08/07/2013 15:06:09
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?
Quote from: monkey_05_06 on Mon 08/07/2013 15:06:09
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:
#ifver 3.2
#define USE_OBJECT_ORIENTED_AUDIO
#endif
Usage example:
#ifdef USE_OBJECT_ORIENTED_AUDIO
// In AGS 3.2 you do it this way:
// Audioclip *openDoorSound = aDoorsound;
AudioClip* openDoorSound,
closeDoorSound,
unlockDoorSound;
#endif
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.
/me needs way to long for teh english.
I still post it for the records :)
Quote from: monkey_05_06 on Mon 08/07/2013 15:06:09
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
Quote from: monkey_05_06 on Mon 08/07/2013 15:06:09
Without looking through your code,...
Let me support your laziness
#The very first script header:
#ifver 3.2
#define USE_OBJECT_ORIENTED_AUDIO
#endif
And this is how it works
#ifdef USE_OBJECT_ORIENTED_AUDIO
import int wicked_sound_function(AudioClip *sound);
#endif
#ifndef USE_OBJECT_ORIENTED_AUDIO
import int wicked_sound_function(int sound);
#endif
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
--double post, sorry
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.
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.
Quote from: abstauber on Wed 23/10/2013 14:57:51
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.
Quote from: Monsieur OUXX on Thu 24/10/2013 01:54:06
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.
Quote from: abstauber on Thu 24/10/2013 12:48:14
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.
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.
Quote from: Crimson Wizard on Thu 24/07/2014 21:24:08
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.
Quote from: Crimson Wizard on Thu 24/07/2014 21:24:08
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!
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.
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!
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.
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 :)
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
EDIT
Spoiler
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.
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"
//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);
Should we really be able to pick up already taken inventory items?
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)
Alright, I keep things as they are and just incorporate the 32bit update.
Quote from: abstauber on Wed 22/04/2015 09:06:21
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.
Abstauber, I found a mistake in this module:
function EnterRoom(this Character*, int newRoom, int x, int y, eDirection dir, bool onWalkable) {
this.ChangeRoom(newRoom, x, y);
if (onWalkable) this.PlaceOnWalkableArea();
this.FaceDirection(dir);
}
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.
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?
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
Quote from: abstauber on Fri 10/07/2015 13:50:12
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
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?
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?
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:
// for compatibility reasons
enum eDirection {
eDir_None = 0,
eDir_Up = eDirectionUp,
eDir_Left = eDirectionLeft,
eDir_Right = eDirectionRight,
eDir_Down = eDirectionDown
};
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:
import function EnterRoom(this Character*, int newRoom, int x, int y, eDirection dir);
needs to be
import function EnterRoom(this Character*, int newRoom, int x, int y, CharacterDirection dir);
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.
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?
Hi! Nice work on the template, appreciate it!
Although, I am receiving an error after the update:
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?
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.
Quote from: abstauber on Tue 14/07/2015 22:27:00
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!
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
Quote from: tobulos1 on Tue 14/07/2015 19:59:24
Although, I am receiving an error after the update:
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?
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.
Quote from: Crimson Wizard on Wed 15/07/2015 10:00:01
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 :(
Quote from: abstauber on Wed 15/07/2015 10:43:16
@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:
if (player.ActiveInventory==inventory[key]) {
In context, this is the whole block of code:
text, text...
else if (UsedAction(eGA_UseInv) && key>=0) {
if (any_click_move (x, y, dir)) {
if (player.ActiveInventory==inventory[key]) {
if (get_door_state(door_id)==1) {
if (!String.IsNullOrEmpty(get_door_strings("closefirst"))) player.Say(get_door_strings("closefirst"));
}
else if (get_door_state(door_id)==2) {
if (unlockDoorSound != null) chan = unlockDoorSound.Play();
if (!String.IsNullOrEmpty(get_door_strings("unlock"))) player.Say(get_door_strings("unlock"));
set_door_state(door_id, closevalue);
}
else if (get_door_state(door_id)==0) {
object[obj].Visible=false;
set_door_state(door_id, 2);
if (!String.IsNullOrEmpty(get_door_strings("relock"))) player.Say(get_door_strings("relock"));
}
}
else if (!String.IsNullOrEmpty(get_door_strings("wrongitem"))) player.Say(get_door_strings("wrongitem"));
}
}
else result=0;
return result;
// 0 = unhandled
// 1 = handled
// 2 = NewRoom
}
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.
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.
Quote from: abstauber on Thu 16/07/2015 20:35:19
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!
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).
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
Quote from: abstauber on Thu 17/09/2009 16:16:37
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.
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.
Quote from: Crimson Wizard on Tue 21/07/2015 10:32:22
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 :)
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.
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.
//guiscript.asc
bool approachCharInteract = false; // walk to character before starting interaction
It's also mentioned in the changelog in guiscript.ash.
Quote from: abstauber on Tue 25/08/2015 07:20:44
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.
Found bug: for 3.4 version scrolling mouse wheel causes active option to be run.
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
info.RunActiveOption();
new
if (button != eMouseWheelSouth && button != eMouseWheelNorth) info.RunActiveOption();
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.
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:
// room script file
function room_FirstLoad()
{
// close door on startup when entering the room (0 = closed; 1 = open; 2 = closed & locked)
set_door_state(21, 0);
init_object(21, oDoor.ID);
}
function hDoor_AnyClick()
{
if (any_click_on_door_special(21, oDoor.ID, 75, 175, eDir_Left, 1, 280, 260, eDir_Down, null, null, 4, 0)==0) Unhandled();
}
I double checked that the hotspot is called 'hDoor' and the object is called 'oDoor'.
Thanks in advance for any suggestions.
Lucasio6
Quote from: lucasio6 on Thu 22/10/2015 15:19:21
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.
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?
Quote from: lucasio6 on Fri 23/10/2015 11:38:25
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.
*Push*
New version. See the first post for details.
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.
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?
Quote from: LogicPort on Thu 18/02/2016 17:01:22
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?
(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.
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.
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.
Quote from: LogicPort on Fri 19/02/2016 17:23:30
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.
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!
"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.
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.
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!
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.
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
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?
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)
Quote from: abstauber on Wed 22/03/2017 16:20:58
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.)
Quote from: Monsieur OUXX on Thu 30/03/2017 10:29:47
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.
Quote from: Monsieur OUXX on Thu 30/03/2017 10:29:47
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.
Quote from: Monsieur OUXX on Thu 30/03/2017 10:29:47
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
Quote from: abstauber on Thu 30/03/2017 14:07:46
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.
Quote from: abstauber on Thu 30/03/2017 14:07:46
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).
Quote from: abstauber on Thu 30/03/2017 14:07:46
Quote from: Monsieur OUXX on Thu 30/03/2017 10:29:47
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.
Quote from: abstauber on Thu 30/03/2017 14:07:46
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...
Quote from: abstauber on Thu 30/03/2017 14:07:46
Anyway, great to know that 7coG is on board :-D
...And we're happy and grateful to be able to use powerful tools. ;)
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 :)
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.
Quote from: abstauber on Mon 24/04/2017 16:16:30I'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 ;)
Thanks :)
I'm trying to recreate most features of Thimbleweed Park - I even bought the game for this purpose :D
Implemented features are:
- double click to run
- Keep-left-mouse-button-pressed-to-keep-character-walking ;)
- Switch between the classic UI and the new one (with the action label following the mouse) during gameplay
- new Save/Load GUI with screenshots and automatic description
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.
Great Features!!!. I'm waiting for it ;-D
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.
Thanks to arj0n, we now have a dutch translation and a new release! :grin:
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!
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
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).
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)
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 :)
Aah, so I could have just changed that instead. Good to know, thanks! ;-D
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 :)
Quote from: Monsieur OUXX on Tue 03/07/2018 21:35:08
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?
Issue I had with git:
Spoiler
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 :
Spoiler
- 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)
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.
Is the github repo up to date? 1.6.3 is from June 2018 but the repo shows last changes from 9 months ago.
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
CDG.uparrow_img = 124;
CDG.uparrow_xpos = 137;
CDG.init();
you have to do that
int spriteSettings[] = CustomDialogGui.GetDefaultSettings_Sprites();
spriteSettings[eCustomDialog_uparrow_img] = 124; //custom sprite for up arrow
spriteSettings[eCustomDialog_uparrow_hi_img] = 137; //custom sprite for highlighted up arrow
CDG.ApplySettings_Sprites(spriteSettings); //apply the changes
CDG.init();
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?
Quote from: abstauber on Fri 27/07/2018 13:27:46
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):
struct CustomDialog
{
import attribute int IndexedOptions[];
}
And then implement like
int CustomDialog::geti_IndexedOptions(int index)
{
if (index == 0) return dlg.background_color;
if (index == 1) return dlg.foreground_color;
}
void CustomDialog::seti_IndexedOptions(int index, int value)
{
if (index == 0) dlg.background_color = value;
if (index == 1) dlg.foreground_color = value;
}
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).
Quote from: abstauber on Fri 27/07/2018 13:27:46
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.
Quote from: Monsieur OUXX on Fri 27/07/2018 14:03:24
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.
Quote from: Monsieur OUXX on Fri 27/07/2018 14:03:24
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
Quote from: abstauber on Fri 27/07/2018 14:35:25
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 :
Spoiler
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.
@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.
Quote from: Monsieur OUXX on Mon 30/07/2018 18:51:22
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).
Quote from: Monsieur OUXX on Mon 30/07/2018 18:51:22
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).
Quote from: Crimson Wizard on Fri 27/07/2018 13:39:19
What I mean by "property array", you could declare an attribute of array type like this (random example):
struct CustomDialog
{
import attribute int IndexedOptions[];
}
And then implement like
int CustomDialog::geti_IndexedOptions(int index)
{
if (index == 0) return dlg.background_color;
if (index == 1) return dlg.foreground_color;
}
void CustomDialog::seti_IndexedOptions(int index, int value)
{
if (index == 0) dlg.background_color = value;
if (index == 1) dlg.foreground_color = value;
}
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!
Quote from: Crimson Wizard on Mon 30/07/2018 19:17:36
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.
@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?
Quote from: abstauber on Tue 31/07/2018 09:21:25
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.
Quote from: Snarky on Tue 31/07/2018 09:07:47
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
Quote from: Snarky on Tue 31/07/2018 10:02:02
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 ;)
Quote from: abstauber on Tue 31/07/2018 13:45:57
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.
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" :-\
@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.
Hi!!! I was trying to change the GUI language by clicking on two buttons (one Spanish and one English flag).
Thanks to Khris, I did the following:
I added in guiscript.ash (header):
import int lang;
Then I opened the main guiscript.asc and above of int lang = eLangES (my first language in the 16 line); I scripted in the 17 line this
export lang;
After that I script in the English button event of Any_click this
function english_AnyClick()
{
lang = eLangEN;
AdjustLanguage();
AdjustGUIText();
if (Game.ChangeTranslation("English") == true) {
Display("English loaded");
}
}
And everything seemed to work, the 9 verbs changed and the action text as well. However, I've noticed that when I press F5 to load or save the game, pause, or exit, those options remain in Spanish and have not changed no way.
What happen? What I can be doing wrong?[/code]
Instead of AdjustLanguage(), try
InitGuiLanguage();
If I find the time I'll dig into this a bit deeper tomorrow.
edit: removed bogus
I've tried what you told me abstauber, but the exact same thing is still happening
Haha, a bug after all those years 8-0 (laugh)
You are totally right, there is something wrong in the code. In order to fix it you have to either wait until I release a fixed version or do the following:
In guiscript.asc find the function AdjustGuiText() - it should start around line 784
Now replace the lines
// english is the default language, nothing to adjust
return;
with this:
// English
OptionsTitle.Text = "Options";
OptionsMusic.Text = "Music Volume";
OptionsSound.Text = "Sound Effects Volume";
OptionsSpeed.Text = "Game Speed";
OptionsDefault.Text = "Default";
OptionsSave.Text = "Save";
OptionsLoad.Text = "Load";
OptionsRestart.Text = "Restart";
OptionsQuit.Text = "Quit";
OptionsPlay.Text = "Resume";
gPausedText.Text = "Game paused. Press <Space> to continue";
RestoreTitle.Text = "Please choose a game to load";
RestoreCancel.Text = "Cancel";
SaveTitle.Text = "Please enter a name";
SaveOK.Text = "Save";
SaveCancel.Text = "Cancel";
gConfirmexitText.Text = "Are you sure, you want to quit? (Y/N)";
gRestartText.Text = "Are you sure, you want to restart? (Y/N)";
(the curly braces need to stay of course, so just replace the comment and the return command - nothing else ;) )
after that, it should work just fine.
Now it works perfect! Oh, you can not imagine the headache this brought me. I thank you very much for your help and I owe you at least 4 or 5 blue glasses full of beer, or with what you prefer to fill them! ;) (roll) (roll) (roll)
Great that you got it working and thanks for reporting the bug. I'll be updating the template soon.
The template has been updated.
I'm doing my graphic adventure with score. So far I have no problem to increase the score as you go. However, I would like the score to be shown in the GUI gOptions, under the RESUME button.
How could I do this?
You just add a label and as text you define:
@SCORE@
AGS handles the rest for you.
Heya! I really needed to bump this thread for a reason.
I have been using this great plugin for my game troughout the last two yeas and made some custom changes to it here and there (mostly altering the way some verbs works).
However, now I want the player to be able to talk to any hotspot and object troughout the game, not only to characters. I have been looking for a line of code I could edit to enable this, but I haven't found anything similiar, nor do I know how I could achieve that with another (hacky?) way.
Any help is greatly appreciated <3
Hi there,
there's support for this feature for a few years - so chances are high, that also your version of the template has this it in.
in guiscript.asc keep looking for this (around line43) and set it to true:
bool objHotTalk        = false; // Talk to Objects and Hotspots
Thank you! It's that easy actually?
I have look into the guiscript.acs, but I couldn`t find said line even with a search. I started using version 1.5.2 of the plugin in late 2017. :(
Could I do it an a different, more hacky way?
Oh I see, it seems like you've missed it only by a few months.
But thanks to github, here's the change I made:
https://github.com/dkrey/ags_9verb-template/commit/ff32959675395ceffb73d018d8b35e27a3a12d79#diff-a615dc2d3934cff60e75e03baab6ae21
First you need to add objHotTalk to guiscript.asc
bool objHotTalk = true;
And then you need to change this line:
cond =((isAction(eGA_TalkTo) || (isAction(eGA_GiveTo) && (Mouse.Mode == eModeUseinv))) && (GetLocationType(mouse.x, mouse.y) != eLocationCharacter));
to this lines:
if (objHotTalk && isAction(eGA_TalkTo) ) {
cond = false;
}
else {
cond =((isAction(eGA_TalkTo) || (isAction(eGA_GiveTo) && (Mouse.Mode == eModeUseinv))) && (GetLocationType(mouse.x, mouse.y) != eLocationCharacter));
}
That should do the trick.
Works perfectly! Thanks so much! :-D
Hi!! Is possible select an item in the inventory with script? I need to select it to see “use rope on...†in the verbs line when I pick up a room object.
Hi again!!!
Could anyone help me with an issue? How could I use a background object on a character appearing on the same background? I would like to combine it... that is, "use OBJETC X in CHARACTER" without needing to take it. Any idea?
Hi there,
I haven't tried anything yet, but it could be possible with some additional scripting.
How about adding an invisible inventory item and setting it active.
Also you need to make the player character clickable.
Once the player looses the rope, you need to make the charcter unclickable again and remove the invisible item.
Anything else might result in modifying the template itself.