Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Chomba

#21
Hi, I'm just dropping by to let you know that the demo is now available on Steam if you want to give it a try!

https://store.steampowered.com/app/1765670/Aboard_the_Adventure/

It will also be part of the BAE Fest which will start soon and will be available JAN 20th-24th.

(I am going to modify the original message also these days to make it more visible)
#22
QuoteYes, I believe this might work (this is the variant 2 i mentioned in the post above).
Oh, snap! It's true! I´m sorry, I didn't quite understand it at the time!

QuoteNote that this may be automated to save a huge amount of time by writing e.g. a Python script, as mentioned in my comment too.

Yes, here:

QuoteRegarding p2 I would not do that without some tool though. Idk if such tool exists (can Speech Center do that?). As an example of a simplier tool, it could be a script (e.g. in Python or similar scripting language) that parses the original lines in TRS, and makes sure that their translation has (voice number + N) set, where N is some offset. Similar tool or script could name the voice files for the different language accordingly.

I think one way to make the change (rough, but it would be a way) would be inside AGS itself, generate an empty script and paste all the text from your translation file.

You use the replace text tool and put:

Replace: &
with: &100000
(edit: you should delete the zeros where appropriate)

then you give it to skip one (the original line) and replace another (the dubbing line) successively until the end. After that you copy the ags into your translation document and you are ready to go.

This is a way of doing it "by hand" and making a control of it at the same time... I can't think how to automate it (I have no coding knowledge).

QuoteOn a side note, i only recently noticed that numbers over 9999 are available since AGS 3.5.0 (this limit got fixed by some unrelated change).
Lucky me! XD
#23
That's amazing!!


In the meantime, I think I found a way to do it differently. I don't know how feasible it is for a large project, but it works like this (may be useful for older versions):

Let's say we have a line of dialog.

Code: ags
cRoger.Say ("&1 There's a snake in my boot!"); 


already numbered for the speech and we have two audios for it, one in English and one in Spanish.

So what we do is generate two translation files. 1: "English voice with English text" and 2: "Spanish voice with English text".

We will name the English audio as ROGE1 and the Spanish one as a variant that we will never get to, as ROGE1000001 (there has to be a number before the 0, otherwise it will read it as just the number 1).

then we go to the translation file 1 and "translate" it like this:

&1 There's a snake in my boot!
&1 There's a snake in my boot!

this will play the English audio when we see that dialogue in English.

Then, if we go to translation file 2 and put the following translation:

&1 There's a snake in my boot!
&1000001 There's a snake in my boot!

we will see the text also in English, but with a Spanish dub :D.

Please note that we number 1 and 1000001 (the next one would be 2 and 1000002) in order to be able to easily replace the numbers when editing the texts and not to complicate the naming of the audio files.

It's a lot of hard work, but it would be a way to do it (I tried it and it works).

What do you think about it?
#24
QuoteThis looks soooooooo good.  Checked it out on Steam, and of course Wishlisted it!  It will (obviously) tickle the fancy of us classic gamers who are lifelong fans of Lucas Arts.  Can't wait till 2023 (!) when it's done!
Thank you very much! it means a lot  :grin: :grin:!

Quotethis should be fun!
I hope so! I am having a blast doing it!

QuoteThis looks really great! Good luck with the production!
Thank you!
Luckily it's going pretty well, and when I have problems that I can't get around the forum is giving me a huge hand.
Khris, Cassiebsg, Crimson Wizard, eri0o and a few others are partly responsible for me being able to get as far as I have so far. I couldn't be happier with this community!
#25
QuoteGood luck with it!
Thank you. (fingers crossed)

QuoteThat Ninja looks really out of place, ha.
I promise the ninjas will make sense! haha

QuoteHarrison, lol.
:grin:

QuoteLooks great! Reminds me of Indy, Lucasfilm Games.
Thank you, Lucas Arts games are the biggest source of inspiration in terms of spirit and style of the game I want to make!
#26
Thanks so much Rincewind! There have already been several people who have pointed out the Flight of the Amazon Queen vibe.
I'm willing to accept any favorable comparisons haha, but I think the tone of FOTAQ is much more delusional to what I'm aiming for!
But yeah! I guess the pulp nature of the stories can take us down similar paths!
#27
I'm currently working on the translations and voice-overs for the Demo... there might even be a surprise for one of these three languages!
(Portuguese translation will be revised in the next weeks, English and Spanish are ready :D)

#28
Thanks Cassiebsg!

QuoteYup, that's what I meant in my PS above.
Well, it worked  :grin:.

Code: ags
{
       LocationType loc_type = GetLocationType(mouse.x, mouse.y);
      if (loc_type == eLocationNothing && player.ActiveInventory!=null)  return;
      else if (player.ActiveInventory!=null) 
      {
         if (loc_type != eLocationNothing) Mouse.Mode = eModeInteract; // if mouse is over a location
        else Mouse.Mode = eModeUseinv; // ← Moved after else
      }
      else if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;
      else
      { 
       Mouse.SaveCursorUntilItLeaves();
       Mouse.Mode = eModeInteract;
       }
}


This one didn't quite work out. The yellow pointer over the points of interest and turning red when selecting an item works. But when I pass with a selected item over an object, the pointer turns yellow and stays that way.


What I would like to achieve now (with the code I was able to come up with, which so far seems to be the one that gave me the best answer to the situation of the pointers "dropping") is that when I have an item selected and pass over a point of interest, the cursor changes to usermode2.

I don't know if the logic is right, I made some try and error but nothing came out of it.

Code: ags
{
   LocationType loc_type = GetLocationType(mouse.x, mouse.y);
  if (loc_type == eLocationNothing && player.ActiveInventory!=null)  return;
  else if (player.ActiveInventory!=null) Mouse.Mode = eModeUseinv; // 
  else if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;
// I guess there should be a command here that says that if I have an item selected and I pass over a point of interest, the pointer changes to usermode2
// and somewhere there should be a command to return to the selected item if it is not over a point of interest.
  else
  { 
   Mouse.SaveCursorUntilItLeaves();
   Mouse.Mode = eModeInteract;
   }}
#29
Hello,
I am about to apply the voice acting files to my game. I do the automatic line numbering and it does fine, then I generate the V.A. script and it says everything went fine.
But when I go to look at the V.A. script file, in the lines per character part, it is awarding lines from one character to another.

For example, a line said by Harrison is assigned to FHarrison. However, in the part where it shows the lines by order of appearance in the code, they are well distributed... I do not understand what is going on and it is a problem that can slow me down a lot the organization of this part of the work.
What could be happening?

EDIT:
forget it, I think I figured out why. Some lines are written as player.say and I have 3 playable characters in the game. I guess that's why it randomly assigns them.
#30
ummm... nope  :-[.
Let's see, this is what I get from the code as it stands:

Code: ags
function repeatedly_execute() // We know what this does.
{
   LocationType loc_type = GetLocationType(mouse.x, mouse.y); // This gets the information where the mouse is located on the screen.
  if (loc_type == eLocationNothing && player.ActiveInventory!=null)  return; // If you are not over a point of interest and you have an element selected, return to...
  else if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;         // put the cursor in pointer mode
  else                                                                                                      // if not
  { 
   Mouse.SaveCursorUntilItLeaves();                                                         // saves the cursor mode until the mouse leaves in...
   Mouse.Mode = eModeInteract;                                                              // this mode (the yellow cursor)
   }
}


So I thought of adding a line to clarify that if an item is selected, the pointer is in "selected item" mode.

Apparently it worked! it no longer turns yellow when there is a selected item and you go over a point of interest (which I kind of liked), but it seems to work!

The code is like this (let's see what you think, if it can generate some kind of problems):

Code: ags
{
   LocationType loc_type = GetLocationType(mouse.x, mouse.y);
  if (loc_type == eLocationNothing && player.ActiveInventory!=null)  return;
  else if (player.ActiveInventory!=null) Mouse.Mode = eModeUseinv; // ← This is the new line of code
  else if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;
  else
  { 
   Mouse.SaveCursorUntilItLeaves();
   Mouse.Mode = eModeInteract;
   }}

#31
Well, I made the change and it worked to some extent.

The pointers change well, except that now the hotspot pointer also works even if an item is selected (in my case, it turns red when you select an item and yellow when you are over a hotspot or object. Now even if it is red, it also turns yellow when you are over the hotspots and turns back to red when it is not). But this doesn't bother me, maybe it's even better.

The issue is that sometimes with an item selected (and only in that condition) the pointer gets stuck in yellow after passing over a hotspot or object.
#32
Thanks Cassiebsg, I´m getting this error

Type mismatch: cannot convert "int" to "inventory item" in this line:

Code: ags
// called on every game cycle, except when the game is blocked
function repeatedly_execute()
{
 LocationType loc_type = GetLocationType(mouse.x, mouse.y);
  if (loc_type == eLocationNothing && player.ActiveInventory)  return; // ← Error
  else if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;
  else
  { 
   Mouse.SaveCursorUntilItLeaves();
   Mouse.Mode = eModeInteract;
   }
}
#33
Yes, it's me again.

I'm having this problem that I don't know how to solve:

I have a code made so that the cursor changes when the mouse is over a hotspot or object and returns to normal when it´s not (thanks Khris!).

GlobalScript.asc
Code: ags
// called on every game cycle, except when the game is blocked
function repeatedly_execute()
{
 if (player.ActiveInventory) return;
 
  LocationType loc_type = GetLocationType(mouse.x, mouse.y);
  if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;
  else { 
    Mouse.SaveCursorUntilItLeaves();
    Mouse.Mode = eModeInteract;
}}


But now I have this strange problem, where if I select an item and move the mouse quickly, the pointer of the selected item disappears and returns to the normal pointer even if the item is still selected.
Here I attach a video showing what happens:



Does anyone know how to solve this?

I tried changing the code to the section of
Code: ags
// called on every game cycle, even when the game is blocked
function repeatedly_execute_always()

but the same thing keeps happening

PS:
I tried it and tried to fix it for a while longer before posting (yes, I saved the message in case I couldn't solve it). I noticed that the cursor doesn't change only by the movement speed, sometimes it does it also by going slow, or even never changes to the item selection one.
#34
Cool! Thanks CW, I will apply that.
I had noticed a difference (and I use the else if in other parts of the code), but it wasn't very clear to me.
#35
I was getting an error.
I put it together as you said and it worked fine:

Code: ags
function unhandled_event (int what, int type)
{

if (what == 1) // Unhandled events for HOTSPOTS
{
if (type == 1) // look
{
int i = Random(2);    
switch (player)
{
    
case cRoger:
    if (i == 0)player.Say ("X1");
    if (i == 1)player.Say ("X2");
    if (i == 2)player.Say ("X3");
break;
    
case cBruno:
    if (i == 0)player.Say ("Z1");
    if (i == 1)player.Say ("Z2");
    if (i == 2)player.Say ("Z3");
break;
    
case cCarlos:
    if (i == 0)player.Say ("Z1");
    if (i == 1)player.Say ("Z2");
    if (i == 2)player.Say ("Z3");
break;
        
}}


Thanks again Khris!
#36
Hello! here I am again with more problems!  :grin:

Well, I plan to have 3 playable characters throughout the game and I wanted to give unique sentences to each for unhandled events.

So far I accomplished this with the following code model:

Code: ags
function unhandled_event (int what, int type)
{
if (what == 1) // Unhandled events for HOTSPOTS
{
if (type == 1) // look
{
    
switch (player)
{
    
case cRoger:
cRoger.Say("Unhandled events for HOTSPOTS 1A");
break;
    
case cBruno:
cBruno.Say("Unhandled events for HOTSPOTS 2A");
break;
    
case cCarlos:
cCarlos.Say("Unhandled events for HOTSPOTS 3A");
break;
        
}}


So far it works fine, I managed to apply it to each of the unhandled events. The problem arises when I want to add more lines and randomize them (I want each character to have at least 3 varied lines).

I tried combining it with a system I had set up for a single character and it worked well:

Code: ags
 if (what == 1) // Unhandled events for HOTSPOTS
  {
    if (type == 1) // look
    {
    int i;
    i = Random (8);
    if (i == 0)player.Say ("Nada interesante por allí");
    if (i == 1)player.Say ("Nada nuevo bajo el sol");
    if (i == 2)player.Say ("Nada que llame la atención");
    if (i == 3)player.Say ("No le veo nada especial");
    if (i == 4)player.Say ("No tengo nada que decir al respecto");
    if (i == 5)player.Say ("Aha...");
    if (i == 6)player.Say ("¿Debería decir algo sobre eso?");
    if (i == 7)player.Say ("Lo veo");
    if (i == 8)player.Say ("Nada especial sobre eso");


and it looked something like this:

Code: ags
function unhandled_event (int what, int type)
{
if (what == 1) // Unhandled events for HOTSPOTS
{
if (type == 1) // look
{
    
switch (player)
{
    
case cRoger:
int i;
    i = Random (2);
    if (i == 0)player.Say ("Nada interesante por allí");
    if (i == 1)player.Say ("Nada nuevo bajo el sol");
    if (i == 2)player.Say ("Nada que llame la atención");
break;
    
case cBruno:
int i;
 i = Random (2);
    if (i == 0)player.Say ("No sabría que hacer con eso");
    if (i == 1)player.Say ("No se que hacer con eso");
    if (i == 2)player.Say ("No me interesa hacer nada con eso");
break;
    
case cCarlos:
int i;
 i = Random (2);
  
    if (i == 0)player.Say ("No creo que eso funcione");
    if (i == 1)player.Say ("¿Por que haría eso?");
    if (i == 2)player.Say ("No le veo el sentido");
break;
        
}}


but this logic does not apply, so it does not work.
How can I achieve the desired effect?
#37
Thanks Khris! It works great!  :grin: :grin: :grin:

so if I understood correctly, the lines would be doing something like this:

Code: ags
function repeatedly_execute() {
 
  if (player.ActiveInventory) return; // exit function here
 
  LocationType loc_type = GetLocationType(mouse.x, mouse.y);
//The one before tracks de mouse location on the screen.
  if (loc_type == eLocationNothing) Mouse.Mode = eModePointer;
//if the mouse is not on any point of interest (hotspot, object, character), then converts the cursor to pointer mode
  else 
//otherwise, if it's on top of any of that elements
{ 
    Mouse.SaveCursorUntilItLeaves();
    Mouse.Mode = eModeInteract;
//it uses the interact mode
  }
}


and I have configured a pointer from the general preferences for when an item is selected
I guess it is this line that allows that cursor to appear. Isn't it?
Quoteif (player.ActiveInventory) return; // exit function here
#38
Thanks for the help Cassie, but I don't quite understand how to use those functions you mention.... :P
#39
Hello again!

Well, as I'm re-building my game (I went from 3.6.0 to 3.5.0) and I had to redo a lot of things, I realized that there are some things that I don't even remember how I managed to do them in the first place. Some others I was able to optimize and even improve  :-D

One of them is the function to change the mouse pointer while hovering over a hotspot or an object... I don't know how I did it before but it worked fine, I tried to track it down from the 3.6.0 project but I couldn't find it.
I remember it wasn't similar to how I'm doing it now either....

But it doesn't matter. The thing is that I found through the forums this way to handle the issue and it works quite well, there is only one detail (or 2, but only one is really important):

Code: ags
function repeatedly_execute()
{
   LocationType loc_type = GetLocationType(mouse.x, mouse.y);
   if (loc_type != eLocationNothing)
   {
     Mouse.SaveCursorUntilItLeaves();
     if (loc_type == eLocationHotspot)
     {
       Mouse.Mode = eModeInteract;
     }
     else if (loc_type == eLocationObject)
     {
       Mouse.Mode = eModeInteract;
     }
     else if (loc_type == eLocationCharacter)
      Mouse.Mode = eModeInteract;
   }
   else if (loc_type == eLocationNothing)
      Mouse.Mode = eModePointer;
}


My problem is that now when I select an inventory item, it no longer leaves the cursor that I have predefined for that situation, but it goes back to the "pointer" cursor.
I would need some way to create an exception so that if I have an item selected, it does not refresh the pointer or at least does not return it to "pointer". But I don't have much idea how to do it
#40
QuoteThat line doesn't make sense; you can replace "while" with "if". Then it still won't make sense, because you don't need to check the pause state if you're going to unpause the game no matter what.
Replace the line with just  UnPauseGame();.

I got it from the manual:
Quote
UnPauseGame

UnPauseGame ()

Resumes the game.

Example:

if (IsGamePaused() == 1)
    UnPauseGame();
will unpause the game if it is paused.

NOTE: Because PauseGame works as a counter, if you called it more than once, this won't work. To ignore this behavior, unpause as much as needed with the below snippet.

while (IsGamePaused()) UnPauseGame();


QuoteGo to General Settings -> Visual -> "When player interface is disabled GUI should". Make sure that it's not "be hidden". "Wait" is considered a blocking action and makes interface disabled.

I LOVE YOU!!
  :-D :-D
I can't believe it was that!!! I don't even remember changing that option...I may have scrolled over the options unintentionally?

THANKS Guys! I wasted too much time on this  8-0
SMF spam blocked by CleanTalk