Ccoa's Universal Message System realistic SE playing on specific letters

Discussion in 'RGSS Script Requests' started by Andrea87Sky, Jun 2, 2019.

  1. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    80
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Hey, I recently started to use UMS script, and it has a system that produces a SE letter-by-letter in a message, and I was wondering if there's a way to make this SE to play only on specific letters, like not on spaces, points or commas, for make the message to sound like a real talking. (Should be compatible with UMS, that can be found here: https://save-point.org/thread-2394.html)

    This is an example of what I'm searching from a game called Deltarune:
     
    #1
  2. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    301
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMXP
    Yeah, that will be a bit too large a file for me to play at home while I have a Dialup AOL connection Really. No. Seriously, I do.

    Simulated speech by way of playing SEs keyed to ... letters? I really don't see that happening. Only a sophisticated dialog system with an extensive library of phoenetics would accomplish that. And even that. you'd need the system to include character inflection.

    It could be easier to have SE files of your dialog to begin play before the messagebox is rendered. Granted, with actually recognizable dialog that the player can understand, the size of your SE folder could be great. But if you go the SIMs route, you could have a smattering of gobble-de-gook play for various scenes. Meh, works for them. Can anyone understand SIMglish?
     
    #2
  3. Trihan

    Trihan Speedy Scripter Veteran

    Messages:
    1,483
    Likes Received:
    978
    Location:
    Buckie, Scotland
    First Language:
    English
    I didn't get the impression that OP was asking for actual simulated speech so much as an SE playing on letters but not on non-letter characters.
     
    #3
  4. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    80
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    So it isn't possible? :c
     
    #4
  5. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    301
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMXP
    For some weird reason, I am unable to actually watch the video which you posted and I am not familiar with Deltarune.

    Hrm... it's been a while since I dabbled with plain old ASCII codes. And I don't normally dabble with her code. But I've known Sasha since our days at HBGames (when it was RMXP.Org in 2004-2007) and I know her coding style.

    OKAY... around line 1741 in the UMS, you should have something like this:
    Code:
          if Graphics.frame_count - @count >= speed
            if $game_system.sound_effect != ""
              Audio.se_play("Audio/SE/" + $game_system.sound_effect, 80, 100)
            end
    I had to come up with a true/false toggle and a means to test the character that is to be printed before it is rendered in the screen.... so I came up with this. Paste this in place of the above snippet:

    Code:
          if Graphics.frame_count - @count >= speed
             # Set flag false
            play_se_flag = false
             # make a COPY of the text for slicing
            fred = @text.clone
            c = fred.slice!(/./m)
            if c != nil
             # Set flag true if numbers
              if (c[0] >= 48) && (c[0] <= 57)
                play_se_flag = true
              end
             # Set flag true if uppercase letters
              if (c[0] >= 64) && (c[0] <= 90)
                play_se_flag = true
              end
             # Set flag true if lowercase letters
              if (c[0] >= 97) && (c[0] <= 122)
                play_se_flag = true
              end
            end
             # If flag is true, play SE
            if play_se_flag == true
              if $game_system.sound_effect != ""
                Audio.se_play("Audio/SE/" + $game_system.sound_effect, 80, 100)
              end
            end
     
    #5
  6. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    80
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    HOLY..! IT WORKS! THANK YOU!
     
    #6
  7. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    301
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMXP
    Just gotta learn enough RUBY code to be dangerous. [​IMG]

    Then study and practice more to be excellent. [​IMG]

    You did the edit correctly, so you're on your way it seems. Just keep studying. [​IMG]
     
    #7
  8. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    80
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Ye actually there was two same code that says
    Code:
     if Graphics.frame_count - @count >= speed
            if $game_system.sound_effect != ""
              Audio.se_play("Audio/SE/" + $game_system.sound_effect, 80, 100)
            end
    But i replaced both two, because i know that one is for the comic window (I think) and one of the normal window. ;):thumbsup-left:
     
    #8
  9. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    301
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMXP
    [​IMG] There ya go! That's what I mean!
     
    #9

Share This Page