Use the In-Game Community Mods - Cross Platform PA Mod Manager (PAMM) is Obsolete

Discussion in 'Released Mods' started by Mereth, May 24, 2014.

  1. frostsatir

    frostsatir Active Member

    Messages:
    166
    Likes Received:
    72
    I just installed PAMM, but when i trying run this, i see message "Non-ASCII characters found in c/Users....."

    So how add character in?
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    That refers to a bug in PA, which prevents mods from working properly. However, that may actually have been fixed in the last stable build (76766) as one of the items in the changelog was:
    - Improved support for non English alphabets in directory names

    Do mods work for you despite that warning? (Or does PAMM refuse to work because of that warning?)
  3. frostsatir

    frostsatir Active Member

    Messages:
    166
    Likes Received:
    72

    I don't installed any mods before. I wanted install Pa Stats with it, but i don't know how cuz it work not correct as i see.
  4. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Ah, I see. Well, this is a bit tricky, but could you open the file "C:\Users\<username>\AppData\Local\Uber Entertainment\Planetary Annihilation\pamm\resources\app\assets\js\pa.js" in Notepad and change lines 123 to 125 from
    Code:
      if(!rootpath.match(/^[\x00-\x7F]+$/i)) {
      throw new Error("Non-ASCII characters found in '" + rootpath + "'. Sorry, but Planetary Annihilation is known to not work properly with unicode characters.");
      }
    
    to
    Code:
    //  if(!rootpath.match(/^[\x00-\x7F]+$/i)) {
    //  throw new Error("Non-ASCII characters found in '" + rootpath + "'. Sorry, but Planetary Annihilation is known to not work properly with unicode characters.");
    //  }
    
    (That is, just add "//" in front of those lines.)

    That should allow you to start PAMM normally and install mods. If you then install mods, do they work in PA?
  5. frostsatir

    frostsatir Active Member

    Messages:
    166
    Likes Received:
    72

    Ah thanks. Seems it work, but i had a little another code

    Code:
    rootpath = path.join(localpath, "/Uber Entertainment/Planetary Annihilation");
      if(!rootpath.match(/^[\x00-\x7F]+$/i)) {
         return next(new Error("Non-ASCII characters found in '" + rootpath + "'. Sorry, but Planetary Annihilation is known to not work properly with unicode characters."));
        }
    
  6. frostsatir

    frostsatir Active Member

    Messages:
    166
    Likes Received:
    72
    I got mods what i need and Pamm working,but its ok that i always get massage "Pamm failed to update itself to 1.0.3..." ?
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    That would explain why you saw different code than I did. I'm not sure why that is though.
    Anyway, when you install a mod like PA Stats, can you actually use it inside PA? If so, that long standing bug about having a non-ASCII character in one's username would finally be solved.
  8. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    It's probably because you still have some explorer or text file editor open. PAMM update itself by replacing is old folder by a new one.

    Support of unicode path would be an awesome news. I'll try to make some tests myself to validate this behavior and remove the failsafe asap.
  9. Mereth

    Mereth Active Member

    Messages:
    330
    Likes Received:
    164
    Mounting mods from path with unicode characters confirmed working !

    Code:
    [20:25:00.000] INFO Mounting C:\Users\testē§‘\AppData\Local\Uber Entertainment\Planetary Annihilation\client_mods\rPAMM\ as /
    
    I could even detect PA properly when installed in a folder with unicode characters, but it will need more work.
    Code:
    [20:25:01.422] INFO Coherent host dir: "D:\\Games\\Planetary Annihilation\\Planetary Annihilation\\stable\xe7\xa7\x91\\bin_x64\\host"
    
    But at least, those characters aren't just replaced by ? like before :p
    proeleert likes this.
  10. frostsatir

    frostsatir Active Member

    Messages:
    166
    Likes Received:
    72
    Yes, i got PA stats inside game.
    DeathByDenim likes this.
  11. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    @Mereth : It seems like the non-ASCII character bug has been fixed. Can you remove the check for that from PAMM?
    (@raevn : I don't know if you also have that check in Pahub, so just pinging you too)
  12. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    @Mereth The new PA Launcher is installing to C:\Games\Uber Entertainment\Planetary Annihilation Launcher\Planetary Annihilation

    Will you be able to update PAMM to support that?
  13. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    Is there a way to put PAMM inside the game as an ingame mod manager? That sounds much nicer than the current implementation.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I guess it would be possible to make some little nodejs based application that takes commands from PA's UI to install mods and similar. However that would:
    a) need careful considerations to prevent security issues
    b) probably be limited by PA loading some file on startup only.
  15. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    This PAMM scans the log file for the location of PA, doesn't it? So wherever PA is installed, if it has been started just once, PAMM should pick it up. (Unless that changed since I last checked, but I don't think so)
  16. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Ah, you're right. It didn't pick it up the first time because I had only installed with the new launcher but not actually run the game. Looks like I can remove the old directory now
  17. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I think file shadowing only gets set at startup. You could muck with the file mounting apis, but the only way to unmount a file is unmount all of them, so getting that right would be a challenge. If a mod was inaccessible at start, you might also need the external program to host the file within an enabled mod (e.g. itself) If a shadow was in place at start, I'm not sure you could get the original back to reshadow it.

    It might work for mods that use only the scene extensions, although they might need to filesystem enabled at all times so the ingame manager would just need to juggle the scene mod list.
  18. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    Just make an in game mod manager that prompts a game restart to apply the change.
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    that largely defeats the purpose I think
  20. warrenkc

    warrenkc Active Member

    Messages:
    542
    Likes Received:
    191
    Why? An external program is so weird. Who wants to find another program and open it just to load a mod or disable one.
    stuart98 likes this.

Share This Page