Search results for query: *

  1. Alemismun

    Documentation Sound Modding Sound & Music

    I'm not sure but based on that code piece, it appears that this Instance can be called from anywhere - hence you don't need Harmony for that - you can simply call it in your OnSubmoduleLoad or somewhere else, right?
    Technically yes, however, it needs to write to "_battleMode" and "_campaignMode", both of which are readonly (and then probably call Initialize), in order for it to take effect.

    (Here is the original code from MBMusicManager.cs, shortened to relevant items only)
    C#:
    private readonly MBMusicManager.BattleMusicMode _battleMode;
    private readonly MBMusicManager.CampaignMusicMode _campaignMode;
    
    private MBMusicManager()
        {
          if (!NativeConfig.DisableSound)
          {
            int num = (int) PsaiCore.Instance.LoadSoundtrackFromProjectFile(BasePath.Name + "music/soundtrack.xml");
          }
          this._battleMode = new MBMusicManager.BattleMusicMode();
          this._campaignMode = new MBMusicManager.CampaignMusicMode();
        }

    As far as I know (my programming knowledge is limited), there is no way to reference MBMusicManager in order to call its functions directly from our scripts. If it were possible, then we probably could just directly change the LoadSoundtrackFromProjectFile as you said and then call Initialize() again so it assigns it to the current MBMusicManager.
  2. Alemismun

    Documentation Sound Modding Sound & Music

    Well, that's bad and sad
    I guess something is not right with sound modding at the moment as Reus and you already mentioned and struggled with. Let's see if they can fix this soon. Playing a sound shouldn't be rocket science and shouldn't require hella different weird changes.
    100% Agreed! This overly convoluted method should be fixed.

    Speaking of rocket science, we figured out how to use harmony to force load custom soundtrack.xml (so you can play music from your own mod folder without the need to overwrite any vanilla files.
    It can be done by postfixing the path to the xml like this:
    C#:
    namespace Shokuho
    {
        // Music Patching
        [HarmonyPatch(typeof(MBMusicManager), MethodType.Constructor)]
        public class MBMusicManagerPatch
        {
            private static void Postfix(MBMusicManager __instance)
            {
                if (!NativeConfig.DisableSound)
                {
                    int num = (int)PsaiCore.Instance.LoadSoundtrackFromProjectFile(BasePath.Name + "Modules/Shokuho/ModuleSounds/Music/soundtrack.xml");
                }
    
                System.Diagnostics.Debug.WriteLine("Postfix loaded! (Music)");
            }
        }
    }

    However, I have yet to produce a file that the xml will accept in place of "Maintheme". So far it just results in all music disappearing.
    If anyone has better luck with this, be sure to let me know. :smile:

    (Note: Not sure if related but https://csharp.hotexamples.com/examples/psai.Editor/Segment/-/php-segment-class-examples.html)
  3. Alemismun

    Documentation Sound Modding Sound & Music

    However, this is only working for native sounds as far as I can see.
    Indeed, it would seem that way.

    Whats strange is the fact that the "module_sounds.xlm" file implies you should be able to play custom sounds as long as they follow proper formatting.
    [Sample code from the xlm file]
    C#:
    //example:
            int soundIndex = SoundEvent.GetEventIdFromString("example/voice/charge");//to avoid string operations in runtime soundIndex can be cached.
            if (playOneshot)
            {
                MakeSound(soundIndex, MainAgent.Position, false, true, -1, -1);//plays oneshot sound at position with given parameters.
            }
            else
            {
                SoundEvent eventRef = SoundEvent.CreateEvent(soundIndex, Scene);//get a reference to sound and update parameters later.
                eventRef.SetPosition(MainAgent.Position);
                eventRef.Play();
            }
    Even more strange, this code does not even work as far as I can tell either (MakeSound is not valid and I was unable to find a single reference to it via dotpeek). My assumption here is that it must be an outdated comment.
  4. Alemismun

    Documentation Sound Modding Sound & Music

    What about playing sound through code (so for stuff such as UI)?
    I have tried everything and I still cant get it to work ;-; !

    Below is my best guess, but its clear my best is not good enough. Any ideas?
    C#:
    SoundEvent.PlaySound2D(SoundEvent.GetEventIdFromString("hl1scientistdeathscream"));
  5. Alemismun

    Bugs in Phantasy 2018

    talvas said:
    Weavery and Dyeworks sells for more than double what you buy it for, at least in Shariz and elf forest.

    For now I'll be Claradia's first real estate mogul, building weaveries and selling em off for profit. :wink:
    Wait you can sell them? brb gonna become rich.
  6. Alemismun

    Bugs in Phantasy 2018

    leugimimi said:
    Alemismun said:
    Idk If this has been mentioned before but, the game autosaves whenever you try to enter a town and then kicks you out of it, meaning that you gotta enter it twice, this makes sneaking into towns a pain.

    Edit: Another bug: at suno you can speak to the townspeople at the tavern and they will ask you something like "What do we do now" or something and you have the option to say "Prepare, we move at dawn", idk whats with this.

    What version of the mod are you running? My game never auto saves...

    The lastest, I just re-installed it yesterday.
    V156 + Patch
  7. Alemismun

    Bugs in Phantasy 2018

    Idk If this has been mentioned before but, the game autosaves whenever you try to enter a town and then kicks you out of it, meaning that you gotta enter it twice, this makes sneaking into towns a pain.

    Edit: Another bug: at suno you can speak to the townspeople at the tavern and they will ask you something like "What do we do now" or something and you have the option to say "Prepare, we move at dawn", idk whats with this.

    Edit 2:
    unknown.png
      :lol: I hired them for the meems and it gave me some mercenary cavalry.

    Edit 3: My game crashes when I enter the castle in disguise to shawdhsad'sadwa's ladder (Cant really remember the name lol), at least I got an achievement for it. :party: :party: :party:

    Edit 4: Another auto-save bug, whenever I "wait until tomorrow" the game autosaves and sends me back to the select options screen, so endless loop  :facepalm:
  8. Alemismun

    START HERE: Beginner's Guide and Reference Book (2014 version)

    Tuidjy said:
    Alemismun said:
    gsanders said:
    You'll want to use  7-zip from  https://www.7-zip.org/    (and probably the 64-bit Windows version) to open the files with.
    Can I use WinRAR instead or does it have to be 7zip?
    Newer versions of WinRAR can handle .7z files. 

    I still recommend 7zip, but if you already have WinRAR, it should work.
    Yay! Welp here I go!

    Can't wait to finally get rid of the autosave glitch.
    Edit, its still here :sad:
  9. Alemismun

    START HERE: Beginner's Guide and Reference Book (2014 version)

    gsanders said:
    Alemismun said:
    This is a very stupid question, but how do I install this properly?
    I just get phantasy_v156_full_b8b.7z and then on top of it overwrite the files with phantasy_patch_v156b11 right?

      That should do it.

    You'll want to use  7-zip from  https://www.7-zip.org/    (and probably the 64-bit Windows version)
    to open the files with.

      don't forget to set  "load textures on demand" to ENABLED at Warband's first screen (before starting to load the mod),
    by pressing Configure: Video  and looking about 1/3rd of the way down the screen to toggle that.

      You should also have a recent version of Warband -- 1.172, 1.173, or 1.168    (in best to worst order), as there is an operation used in the code that didn't exist in version 1.158 or earlier.

    Can I use WinRAR instead or does it have to be 7zip?
  10. Alemismun

    START HERE: Beginner's Guide and Reference Book (2014 version)

    This is a very stupid question, but how do I install this properly?
    I just get phantasy_v156_full_b8b.7z and then on top of it overwrite the files with phantasy_patch_v156b11 right?
  11. Alemismun

    Feature Requests

    Hey, not sure if this is still in development, but could you add to the nexus page a download that is not an exe file?
    Regardless of if its virus free or not I would feel much better if I could install it without having to use a program.
  12. Alemismun

    Know what, I take it back, Bannerlord will kick ass

    Iv before made some posts saying that I was not convinced on bannelord, that so far, it looked like a dumbed down version of warband with pretty graphics. But today I stumbled upon a few really cool dev posts and I was blown away; like, holy bandits. I totally dig the ability to make your own...
  13. Alemismun

    Flaming sword

    Morrowind Mod Man said:
    The elemental swords do random extra damage on top of whatever hits you land.

    So an ice sword or the balrog's sword would strike for say 15, then deal an additional 10 in elemental damage.
    Also, another question, how do I use magic if I already had read the book and gotten 2 spells? What are the keybinds?
  14. Alemismun

    Flaming sword

    Morrowind Mod Man said:
    The elemental swords do random extra damage on top of whatever hits you land.

    So an ice sword or the balrog's sword would strike for say 15, then deal an additional 10 in elemental damage.
    Nice! Is it 100% random or like within constraint?
  15. Alemismun

    Suggestions

    Please add a chest to the 4 ways INN...
    I dont know where to put my gems and stuff and I dont want to lose them if I am captured... (It seems like the only town I own does not have its own chest)
  16. Alemismun

    Flaming sword

    How does damage work for the sword is it 30 and 25 base damage plus X elemental damage which is not displayed. Or is the 30 and 25 the total damage?
  17. Alemismun

    Bugs in Phantasy 2018

    So, the second time installing the patch it somehow worked. Thanks.

    unknown.png


    ---
    (...stuff about recruiters...)

    GS Edit:" recruiters are removed.  I tried, I failed, it exceeded the point of time invested vs payoff.  Recruiters will always fail anyway when there are many powerful bandits even when they worked -- this was something seen in Perisno 0.7 series.

      As for the orc face, actually I searched for that string in source code, and its not used.  You also get this effect with Ogres and sometimes just random troops.  I expect its a memory leak at the video driver, since when I close the mod after a long session I see a window telling me there is a memory error, but its not coming from the operating system kernel, which handles true errors accessing memory, but rather by some process unique to Warband.  I by the way run under-clocked RAM, intentionally detuned to run slower than XMP setting, in order to have super stable sessions, so I don't believe it is a hardware error, but purely software.  For what its worth.  Putting this answer here so I know what got answered and what did not"
  18. Alemismun

    Bugs in Phantasy 2018

    Recruiters stand idle for no reason even though they have orders.... Umm. Yeah.

    GS Edit: " Correct.  I had to remove them, long story short.  I did try several times to salvage them.  They're gone for good.  For towns, a far superior mechanic was added, found at town recruit sub menu and appearing every 2 days.  For castles, you'll have to personally visit villages, exactly like you had to under Guspav's code 9 months ago.  So don't feel like you lost anything at all, because of me.  You gained... well, something, in the last 9 months.  Think positive."
Back
Top Bottom