Author Topic: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!  (Read 26662 times)

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #60 on: August 11, 2016, 07:08:48 AM »
This is a test post for diagnosing the code formater spoiler problem


Code: (ruby) [Select]
#=============================================================================
#
#          DYNAMIC SOUNDS PATCH
#          Author: Heretic
#          Version: 1.0
#          Date: Saturday, July 30th, 2016
#
#   Instructions: Place Below Dynamic Sounds
#
#   ----   Patch for Ryex's Dynamic Sound Engine----
#
# - Fixes a bug that causes a Fatal Game Crash when a Non Edited Save Game
#   has been loaded.  Any Sounds that were Muted before having been saved
#   will be enabled again.
# - Adds the ability to temporarily turn off Dynamic Engine Effects
#   with a Script Call: $game_system.disable_dee
#
#  Intended for use with DEE Version 1.6 and Dynamic Sounds 2.0
#
#=============================================================================

if DEE::DEE_VERSION > 1.6 and RyexCFG::D_S::VERSION > 2.0
  print "ERROR: Ryex\'s Dynamic Sounds Patch isnt needed with\n",
        "versions higher than version 1.6, you may wish to\n",
        "remove the Patch."
end

module DEE
  class System
    #------------------------------------------------------------------------
    # * Update - DEE::System
    #  - Allows disabling DEE
    #------------------------------------------------------------------------
    alias alias_dee_update update unless $@
    def update
      # Return if DEE is Disabled
      return if $game_system.disable_dee
      # Call Original
      alias_dee_update
    end
  end
end

#==============================================================================
# ** Game_System
#==============================================================================
class Game_System
  attr_accessor :disable_dee    # Allow turning off Dynamic Sounds when true
end

#==============================================================================
# ** Scene_Save
#==============================================================================
class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # * Write Save Data - Scene_Save
  #  - Saves DEE in addition to other Game Variables
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  alias dynamic_sounds_patch_write_save_data write_save_data unless $@
  def write_save_data(file)
    # Call Original or other Aliases
    dynamic_sounds_patch_write_save_data(file)
    # Save DEE to File
    Marshal.dump($DEE, file)
  end
end

#==============================================================================
# ** Scene_Load
#==============================================================================
class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # * Read Save Data - Scene_Load
  #  - Rebuilds entire Dynamic Sounds for a Map when Game is Loaded
  #     file : file object for reading (opened) 
  #--------------------------------------------------------------------------
  alias dynamic_sounds_patch_read_save_data read_save_data unless $@
  def read_save_data(file)
    # Call Original or other Aliases
    dynamic_sounds_patch_read_save_data(file)
    # Restore DEE
    $DEE = Marshal.load(file)
    # If magic number is different from when saving
    # (if editing was added with editor)
    if $game_system.magic_number == $data_system.magic_number
      # Setup Dynamic Sounds on Loaded Map
      RyexCFG::D_S.setup($game_map.map_id)
    end
  end
end
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #61 on: October 06, 2017, 03:41:27 PM »
How can I smoothly fade out BGS which is played by default on map ( is set in Map Properties as Auto-Change BGS )? Fade Out BGS doesn't work. :???:
« Last Edit: October 06, 2017, 03:42:47 PM by Kise »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3142
  • LV: 378
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #62 on: October 06, 2017, 08:34:05 PM »
Just quickly messed with it and this is what I got:

I have Dynamic Sound v2.04 and Dynamic Effects Engine v1.61.
I also have Heretic's Dynamic Sounds Patch above your post.

In Heretic's script, I removed the little message at the top of the script
Code: [Select]
if DEE::DEE_VERSION > 1.6 and RyexCFG::D_S::VERSION > 2.0
  print "ERROR: Ryex\'s Dynamic Sounds Patch isnt needed with\n",
        "versions higher than version 1.6, you may wish to\n",
        "remove the Patch."
end

In your event, do the script call
Code: [Select]
$game_system.disable_dee = trueand then do your Fade BGS.

And then when you want to re-enable, just do
Code: [Select]
$game_system.disable_dee =
false



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline Kise

  • Awakened Visionist
  • **
  • Posts: 61
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #63 on: October 06, 2017, 10:08:17 PM »
Yeah, that works. I tried this method before, but I didn't know that script call requied " = true" so it didn't work. Thanks!

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 749
  • LV: 31
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #64 on: October 07, 2017, 03:05:55 AM »
Quick note on that also:

Any time you do a Script where something = false, the interpreter screws up.  This is known as the Interpreter 355 bug.  Several scripts fix this, but just in case, make sure that on Interpreter command_355 (which is the interpreter for Script calls), remove or comment out the line that says "return false".

Code: [Select]
    # If return value is false
    if result == false
      # End
      return false
    end
    # Continue
    return true

Change to:
Code: [Select]
    # If return value is false
    if result == false
      # End
      #return false
    end
    # Continue
    return true
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3142
  • LV: 378
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #65 on: October 07, 2017, 03:40:38 AM »
But only if you put = false on the same line, which is why I formatted my post like so.
But I'm sure Kise is veteran enough to know that bug exists.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 749
  • LV: 31
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #66 on: October 07, 2017, 05:37:00 AM »
Agreed, but not everyone actually is.  Hopefully we wont even know if explaining that helps others since they wont need to post if it helps to solve issues.  And, good call on the way you formatted the post.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline Sin86

  • Transcended Spirit
  • ***
  • Posts: 178
  • LV: 2
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #67 on: December 24, 2017, 12:50:40 AM »
A very big problem with Blizz ABS plugin I believe.

When applying sounds to an enemy, the sounds will play when I get to the enemy except 2 things.

1. After the enemy dies, the sounds still play, but only at the tile right where the enemy appeared it.

2. When battling the enemy, sounds will play as they should, but only at the enemy's starting tile. If moving around while fighting close ranged at the enemy but away from the spot where it once stood at, the sounds fade out and only activate at the starting tile for the enemy.

This has been tested on the original versions of DEE, Dynamic Sounds and Blizz ABS v 2.7 or higher. Also tested on the latest versions of DEE, Dynamic Sounds as well as with and without Heretic's patch.
« Last Edit: December 24, 2017, 12:52:07 AM by Sin86 »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3142
  • LV: 378
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #68 on: December 26, 2017, 06:42:08 AM »
Your event's configuration is wrong.

Here's an example of one that worked for me:
Code: [Select]
\dee[dbgs|001-Wind01|100|300]
Based on what you described, it sounds like you used bgs instead of dbgs. As the PDF states:
Quote
Dynamic Position Sources
Dynamic Position Sources are sources that follow the event they were placed in; perfect for birds,
enemies, animals, guards in a sneak game, etc.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline Sin86

  • Transcended Spirit
  • ***
  • Posts: 178
  • LV: 2
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #69 on: December 30, 2017, 02:18:34 AM »
Ah, that's how it is done, thanks.

However, there is an issue with the latest version, the script calls for muting and un-muting crash.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #70 on: January 01, 2018, 10:42:52 PM »
you'll have to be a bit more specific. can you snag a screenshot or copy the text of the error message when the script calls crash the game?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Sin86

  • Transcended Spirit
  • ***
  • Posts: 178
  • LV: 2
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #71 on: January 02, 2018, 05:20:47 AM »
The error says:

NameError occurred while running script.

uninitialized constant RyexCGG::D_S

(had to edit the post to make it look like the error because original converted the D into a smiley.)

Also, when having everything installed properly, I can only activate the sounds on Blizz ABS events(events that have enemy tags) and yet will not work on regular events if Pixel movement is set to anything other than 0.

If the pixel rate is however at 0, the sounds play regardless of how close you are to the events, yet can play the sounds on an event regardless if its an enemy or not.
« Last Edit: January 02, 2018, 05:21:50 AM by Sin86 »

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #72 on: January 07, 2018, 09:48:23 PM »
 The obvious culprit then is the typo of 'RyexCGG' the Module should be 'RyexCFG'. Since you didn't give a line number I'm assuming the game didn't give a line number for the error which suggests that the error is happening in a script call so double check those if it DID give a line number for the error I'll need that.  Also, the D_S module isn't under the RyexCFG module so any calls to it should remove the 'RyexCFG::' scope.

If you need more help I'll need a screenshot of the error message, a screenshot of the script call that's causing the error,  and you'll have to copy paste the relevant event comments that you're using to create the sound sources that are not working correctly.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Sin86

  • Transcended Spirit
  • ***
  • Posts: 178
  • LV: 2
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #73 on: January 08, 2018, 03:49:30 AM »
My bad, I made the typo when posting the error. I did CFG and still got it. This is what happens. I can run your demo, get to map004 and talk to the girl who shares this piece of script.

RyexCFG::D_S.mute_source(0,
'011-Waterfall01')


In your demo, it works fine but then again, the demo is using an early build of Dynamic Sounds and DDE. My build is using the current versions and if I input that same exact code, I get the error. And when I got the error, I went into the scripts to see if it can pinpoint me to the error and it did not. If you know of a working code, please do post on how to execute it as apparently that no longer works.
« Last Edit: January 08, 2018, 03:51:55 AM by Sin86 »

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #74 on: January 08, 2018, 04:31:17 AM »
use just
Code: [Select]
D_S.mute_source(0, 011-Waterfall01') and remove the
Code: [Select]
RyexCFG::
The two modules are not nested in the current version. I'm fairly sure they never were but I could be wrong if that's is what is used in the Demo.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Sin86

  • Transcended Spirit
  • ***
  • Posts: 178
  • LV: 2
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #75 on: January 11, 2018, 02:18:49 AM »
It's working partially.. I did D_S.mute_source(0, '011-Waterfall01')

However, this only works on bgs formats but on a dbgs format, no effect is taken. I even put in D_S.mute_piece(0, '013-Fire01', 'campfire 1'[, dynamic ]) and all I get is a "syntax error occurred". I don't know what I am doing wrong.

By the way, I found a typo in line 100.

piece.mute = treu

I think it should be saying piece.mute = true
« Last Edit: January 11, 2018, 02:23:21 AM by Sin86 »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3142
  • LV: 378
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #76 on: January 11, 2018, 03:48:42 AM »
Whenever someone explains how to use a script, like so
Code: [Select]
my_script_call(id, amount[, active])this is saying that the following script calls are valid:
Code: [Select]
my_script_call(id, amount)
my_script_call(id, amount, active)

In the case of D_S.mute_piece, dynamic (the optional parameter) is either true or false.
If you don't specify a value for dynamic, the script will assume a value of false. Essentially
Code: [Select]
D_S.mute_piece(0, '013-Fire01', 'campfire 1')is equivalent to
Code: [Select]
D_S.mute_piece(0, '013-Fire01', 'campfire 1', false)
So clearly what you want to do is
Code: [Select]
D_S.mute_piece(0, '013-Fire01', 'campfire 1', true)



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline Heretic86

  • Astral Trancist
  • *****
  • Posts: 749
  • LV: 31
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #77 on: January 14, 2018, 12:09:28 AM »
Seems like the links in the original post of this thread are dead.  No screenies either.
Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3142
  • LV: 378
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: [XP] Ryex's Dynamic Sounds UPDATE:Version 2 is out!
« Reply #78 on: January 14, 2018, 02:06:26 AM »
?
Wrong thread you posted in? All the links work. And there were no images to begin with.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!