• Welcome to SC4 Devotion Forum Archives.

DAMN Manager

Started by Yild, November 11, 2012, 01:31:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

joshua43214

I wish I had some helpful suggestion. My experience with coding is only with bio-informatics and numerical analysis. In my field, anything with words is nothing but a massive headache.

I really appreciate the hard work you put into this, and your continued support. My game is borderline unplayable with out DAMN, being able to hide the worst of the mess is essential to the game being fun.

Catalyst

#181
Hello, I managed to successfully install DAMN and the DAMN Manager. It took me a while but now it feels even more satisfying ;-).
I have only three points of (constructive) criticism:
- after selecting a lot in the DAMN menu and plopping it, I have to click on "Open DAMN Menu" before I can select another lot. I'm not sure this is related to the DAMN Manager and maybe this is even the way DAMN works, but I find it a little annoying and maybe there is a way to change this,
- getting the preferred DAMN menu size in game is a little complicated, after a while I understood but in some cases the menu remained empty. A small preview or something similar and more count/width/height options in the DAMN manager under "Installer" settings would be great, maybe it could even be made re-sizable in game?
Edit: customization of the window size is actually possible in the "settings" file found in the DAMN Menu installation folder; scroll down for ColumnWidth, WindowHeight & WindowWidth!
Edit 2: actually this doesn't have any effect in-game, haha nevermind.
- initially I had a CTD every time I tried to select a lot in-game from the DAMN menu, after some clicking around in the DAMN Manager I found out by chance that it only occurred to "hidden" lots (DAMNed Lots, hidden in the original SC4 menu's through the zzzzz_DAMN_hidden folder found under /documents/simcity4/plugins). Now I simply leave DAMNed lots unhidden and the whole thing works fine. It would be nice however to have these DAMNed lots hidden from view in those original sc4 menu's. No idea how to do that without causing the mentioned CTD's...

Further I have only compliments & praise for you:  &apls

Scrolling up & down the endless and tiny SC4 menu's was definitely something I disliked most about the game and I think it was an important motivation-breaker. :'(

Thanks for your dedication to making SC4 better!

joshua43214

Quote from: Catalyst on January 19, 2015, 10:04:14 AM
Hello, I managed to successfully install DAMN and the DAMN Manager. It took me a while but now it feels even more satisfying ;-).
I have only three points of (constructive) criticism:
- after selecting a lot in the DAMN menu and plopping it, I have to click on "Open DAMN Menu" before I can select another lot. I'm not sure this is related to the DAMN Manager and maybe this is even the way DAMN works, but I find it a little annoying and maybe there is a way to change this,
- getting the preferred DAMN menu size in game is a little complicated, after a while I understood but in some cases the menu remained empty. A small preview or something similar and more count/width/height options in the DAMN manager under "Installer" settings would be great, maybe it could even be made re-sizable in game?
Edit: customization of the window size is actually possible in the "settings" file found in the DAMN Menu installation folder; scroll down for ColumnWidth, WindowHeight & WindowWidth!
Edit 2: actually this doesn't have any effect in-game, haha nevermind.
- initially I had a CTD every time I tried to select a lot in-game from the DAMN menu, after some clicking around in the DAMN Manager I found out by chance that it only occurred to "hidden" lots (DAMNed Lots, hidden in the original SC4 menu's through the zzzzz_DAMN_hidden folder found under /documents/simcity4/plugins). Now I simply leave DAMNed lots unhidden and the whole thing works fine. It would be nice however to have these DAMNed lots hidden from view in those original sc4 menu's. No idea how to do that without causing the mentioned CTD's...

Further I have only compliments & praise for you:  &apls

Scrolling up & down the endless and tiny SC4 menu's was definitely something I disliked most about the game and I think it was an important motivation-breaker. :'(

Thanks for your dedication to making SC4 better!

Your first wish a game limitation, it is still nicer than the MML deal where you only get one plop at a time.

If you go back one page on this thread, you will find a post from me detailing how DAMN Manager 1.2 is broken, as causes a CTD.
Sadly Yiild has not taken v1.2 down from the STEX, but v!.1.1 is still there as an option when you click the download button.
You will have to uninstall v1.2 and install 1.1.1 and it will work fine with hidden files and no ctd.

Sadly, it seems that RL has taken Yilld away from us. Hopefully he will find the time to come back and get this moving again.

-Josh

Yild

for posterity... FSH/QFS compression/decompression routines in delphi (pascal) based on ilives reader c++ code, I fixed some errors that ware found for some dat files:




type
  TDynByteArray = array of byte;

// Decode file (LUA & other compressed files)
// Input : Data.file.input : input buffer
//         Data.filesize   : input buffer size
// Output: Data.file.output: output buffer

// New generation FSH/QFS decompressor/compressor
// Version 1.22 - copyright (c) Denis Auroux 1998-2002
// auroux@math.polytechnique.fr

// copy from ASrc at ASrcStr index to ADest at ADestStr for ALen bytes
function CopyMemory2(var ADest: TDynByteArray; const ASrc: TDynByteArray; ADestStr, ASrcStr: longword; ALen: longword): integer; inline;
var
  i: longword;
  dst, src: pbyte;
begin

        if ALen = 0 then exit(0); // there is nothing to copy

        src := @ASrc[ASrcStr];
        dst := @ADest[ADestStr];

        for i := 0 to ALen - 1 do begin

          dst^ := src^;
          inc(src);
          inc(dst);

        end;

        result := ALen;

end;

function DecompressData(const AInBuff: TDynByteArray; var AOutBuff: TDynByteArray; var ABuffLen: integer): boolean;
var
  packcode: byte;
  a, b, c, len, offset: integer;
  inlen, inpos, outpos: integer;
begin

        // length of input data
        inlen := ABuffLen;

        // get decompressed buff size
        ABuffLen := AInBuff[2] shl 16 + AInBuff[3] shl 8 + AInBuff[4];

        SetLength(AOutBuff, ABuffLen);

        // check which compression is this (QFS)
        if AInBuff[0] AND $01 <> 0 then
          inpos := 8
        else
          inpos := 5;

        outpos := 0;

        // main decoding loop
        while (inpos < inlen) AND (AInBuff[inpos] < $FC) do begin

          packcode := AInBuff[inpos];

          a := AInBuff[inpos + 1];
          b := AInBuff[inpos + 2];

          if (packcode AND $80 = 0) then begin   // 128

            len := packcode AND 3;

            CopyMemory2(AOutBuff, AInBuff, outpos, inpos + 2, len);

            inpos := inpos + len + 2;
            outpos := outpos + len;

            len := ((packcode AND $1C) SHR 2) + 3;
            offset := ((packcode SHR 5) SHL 8) + a + 1;

            CopyMemory2(AOutBuff, AOutBuff, outpos, outpos - offset, len);

            outpos := outpos + len;

           end
          else if packcode AND $40 = 0 then begin // 64

            len := (a SHR 6) AND 3;

            CopyMemory2(AOutBuff, AInBuff, outpos, inpos + 3, len);

            inpos := inpos + len + 3;
            outpos := outpos + len;

            len := (packcode AND $3F) + 4;
            offset := (a AND $3F) * 256 + b + 1;

            CopyMemory2(AOutBuff, AOutBuff, outpos, outpos - offset, len);

            outpos := outpos + len;

           end
          else if packcode AND $20 = 0 then begin // 32

            c := AInBuff[inpos + 3];

            len := packcode AND 3;

            CopyMemory2(AOutBuff, AInBuff, outpos, inpos + 4, len);

            inpos := inpos + len + 4;
            outpos := outpos + len;

            len := ((packcode SHR 2) AND 3) * 256 + c + 5;
            offset := ((packcode AND $10) SHL 12) + 256 * a + b + 1;

            CopyMemory2(AOutBuff, AOutBuff, outpos, outpos - offset, len);

            outpos := outpos + len;

           end
          else begin

            len := (packcode AND $1F) * 4 + 4;

            CopyMemory2(AOutBuff, AInBuff, outpos, inpos + 1, len);

            inpos := inpos + len + 1;
            outpos := outpos + len;

          end;

        end;

        // trailing bytes
        if (inpos < inlen) AND (outpos < ABuffLen) then begin

          CopyMemory2(AOutBuff, AInBuff, outpos, inpos + 1, AInBuff[inpos] AND 3);
          outpos := outpos + AInBuff[inpos] AND 3;

        end;

        if outpos <> ABuffLen then
          AddLog('F:UncompressData', llSEVERE, 'Bad length, %d insted of %d', [outpos, ABuffLen]);

result := TRUE;

end;

// compressing a QFS file
// note: inbuff should have at least 1028 bytes beyond bufflen for safety
procedure CompressData(const AInBuff: array of byte; var ABuffLen: longword; AOutBuff: pbyte);
const
  WINDOW_LEN = 1 SHL 17;
  WINDOW_MASK = WINDOW_LEN - 1;
  // QFS compression quality factor
  QFS_MAXITER = 50; // quick and not so bad
var
  inrd, inref, incmp: pbyte;
  offs, len, bestoffs, bestlen, lastwrot,
  inpos, inlen, outpos: integer;
  i, j: integer;
  x: pinteger;
  rev_last: array of array of integer;
  rev_similar: array of integer;
  t1, t2: byte;

  // used with low intense  - can stay as local
  procedure FreeTables;
  var
    i: integer;
  begin

          SetLength(rev_similar, 0);

          for i := 255 downto 0 do
            SetLength(rev_last[i], 0);
          SetLength(rev_last, 0);

  end;

begin

        try

          SetLength(rev_similar, WINDOW_LEN);

          SetLength(rev_last, 256);
          for i := 0 to 255 do begin

            SetLength(rev_last[i], 256);
            for j := 0 to 255 do
              rev_last[i, j] := $FFFFFFFF; // -1

          end;

          inlen := ABuffLen;
          inrd := @AInBuff;
          bestoffs := 0;

          if (rev_similar = nil) OR (rev_last = nil) then begin

            ABuffLen := 0;
            FreeTables;
            exit;

          end;

          FillChar(rev_similar[0], WINDOW_LEN * 4, $FF);

          AOutBuff[0] := $10;
          AOutBuff[1] := $FB;
          AOutBuff[2] := inlen SHR 16;
          AOutBuff[3] := (inlen SHR 8) AND 255;
          AOutBuff[4] := inlen AND 255;
          outpos := 5;
          lastwrot := 0;

          // main encoding loop
          for inpos := 0 to inlen - 1 do begin

            if inpos AND $3fff = 0 then ;

            // adjust occurrence tables
            t1 := inrd^;
            t2 := (inrd + 1)^;
            x := @rev_last[t1, t2];
            rev_similar[inpos AND WINDOW_MASK] := x^;
            offs := rev_similar[inpos AND WINDOW_MASK];
            x^ := inpos;

            // if this has already been compressed, skip ahead
            if inpos < lastwrot then begin

              inrd := inrd + 1;
              continue;

            end;

            // else look for a redundancy
            bestlen := 0;
            i := 0;
            while (offs >= 0) AND (inpos - offs < WINDOW_LEN) AND (i < QFS_MAXITER) do begin

              i := i + 1;
              len := 2;
              incmp := @inrd[2];
              inref := @AInBuff[offs + 2];
              while (incmp^ = inref^) AND (len < 1028) do begin

                len := len + 1;
                incmp := incmp + 1;
                inref := inref + 1;

              end;

              if len > bestlen then begin

                bestlen := len;
                bestoffs := inpos - offs;

              end;

              offs := rev_similar[offs AND WINDOW_MASK];

            end;

            // check if redundancy is good enough
            if bestlen > inlen - inpos then
              bestlen := inpos - inlen;
            if bestlen <= 2 then
              bestlen := 0;
            if (bestlen = 3) AND (bestoffs > 1024) then
              bestlen := 0;
            if (bestlen = 4) AND (bestoffs > 16384) then
              bestlen := 0;

            // update compressed data
            if bestlen > 0 then begin

              while inpos - lastwrot >= 4 do begin

                len := (inpos - lastwrot) div 4 - 1;
                if len > $1B then len := $1B;
                AOutBuff[outpos] := $E0 + len;
                outpos := outpos + 1;
                len := 4 * len + 4;
                CopyMemory(@AOutBuff[outpos], @AInBuff[lastwrot], len);
                lastwrot := len + lastwrot;
                outpos := len + outpos;

              end;

              len := inpos - lastwrot;

              if (bestlen <= 10) AND (bestoffs <= 1024) then begin

                AOutBuff[outpos] := (((bestoffs - 1) SHR 8) SHL 5) + ((bestlen - 3) SHL 2) + len;
                outpos := outpos + 1;
                AOutBuff[outpos] := (bestoffs - 1) AND $ff;
                outpos := outpos + 1;
                while len > 0 do begin

                  AOutBuff[outpos] := AInBuff[lastwrot];
                  outpos := outpos + 1;
                  lastwrot := lastwrot + 1;
                  len := len - 1;

                end;
                lastwrot := bestlen + lastwrot;

               end
              else if (bestlen <= 67) AND (bestoffs <= 16384) then begin

                AOutBuff[outpos]:= $80 + (bestlen - 4);
                outpos := outpos + 1;
                AOutBuff[outpos]:= (len SHL 6) + ((bestoffs - 1) SHR 8);
                outpos := outpos + 1;
                AOutBuff[outpos]:= (bestoffs - 1) AND $ff;
                outpos := outpos + 1;
                while len > 0 do begin

                  AOutBuff[outpos] := AInBuff[lastwrot];
                  outpos := outpos + 1;
                  lastwrot := lastwrot + 1;
                  len := len - 1;

                end;
                lastwrot := bestlen + lastwrot;

               end
              else if (bestlen <= 1028) AND (bestoffs < WINDOW_LEN) then begin

                bestoffs := bestoffs - 1;

                AOutBuff[outpos] := $C0 + ((bestoffs SHR 16) SHL 4) + (((bestlen - 5) SHR 8) SHL 2) + len;
                outpos := outpos + 1;
                AOutBuff[outpos] := (bestoffs SHR 8) AND $ff;
                outpos := outpos + 1;
                AOutBuff[outpos] := bestoffs AND $ff;
                outpos := outpos + 1;
                AOutBuff[outpos] := (bestlen - 5) AND $ff;
                outpos := outpos + 1;
                while len > 0 do begin

                  AOutBuff[outpos] := AInBuff[lastwrot];
                  outpos := outpos + 1;
                  lastwrot := lastwrot + 1;
                  len := len - 1;

                end;
                lastwrot := bestlen + lastwrot;

              end;

            end;

            inrd := inrd + 1;

          end;

          // end stuff
          inpos := inlen;

          while inpos - lastwrot >= 4 do begin

            len := (inpos - lastwrot) div 4 - 1;
            if len > $1B then
              len := $1B;
            AOutBuff[outpos] := $E0 + len;
            outpos := outpos + 1;
            len := 4 * len + 4;
            CopyMemory(@AOutBuff[outpos], @AInBuff[lastwrot], len);
            lastwrot := len + lastwrot;
            outpos := len + outpos;

          end;

          len := inpos - lastwrot;
          AOutBuff[outpos] := $FC + len;
          outpos := outpos + 1;

          while len > 0 do begin

            AOutBuff[outpos] := AInBuff[lastwrot];
            outpos := outpos + 1;
            lastwrot := lastwrot + 1;
            len := len - 1;

          end;

          if lastwrot <> inlen then begin

            ABuffLen := 0;
            FreeTables;
            exit;

          end;

          ABuffLen := outpos;

finally
          FreeTables;
        end;

end;


DAMN Manager download: at LEX at STEX
DAMN Manager support thread: at SC4Dev

Yild

New version available on SC4LEX, fixed error with lots plopping causing CTDs.
DAMN Manager download: at LEX at STEX
DAMN Manager support thread: at SC4Dev

Mikey Knox


Ernestmaxis

For some reason 1% from all made lots dont work. You can try to make a new lot with the PIM. copy all properties with the reader from this lot to the new one. Sometimes that does the trick

1SweeTDreamS1

I'm not sure what everyone is crying about... I have windows 10 and all I had to do was right click on the desktop icon, choose "properties" and delete the word "app" from the end of the "Start in" line. It works GREAT! Having everything organized has made the game play much more enjoyable. Thank you very much!!! I'm giving you a perfect score on all websites!  :thumbsup: :bnn: &apls
You Can't Make Sense Out Of Crazy

shanghai kid

I started to play SC4 RH again today, and after a MS win update which blocks SC4 from starting, i had to make a script(found a how to, online) that stops the "Sec. update" until SC4 starts.

The game plays fine, but the problem is that i had lots of "lots" in damn within different folders, but now i only get the 3 main icons... arrow left, home and questionmark.

I've moved the SC4.exe from apps to maxis\sc4 deluxe folder.
The SC4 shortcut is directed to the scriptfile, which in the script is linked to the maxis\sc4 deluxe\ sc4.exe..... when i played a very long time ago it worked fine, but not anymore.... i even tried making a new single damn folder(removing the old root folder from SC4) with just some lots, but still empty "damn manager browser window".

Anyone know how to fix this?

Ps. i'm using win 7.
Shanghai kid from Norway
"The lurking devil"
(Bam Bam Bigelow & Eddie Guerrero R.I.P).

YouBet

Hey, Shanghai.

I had a similar problem that I referenced in the thread, "CD Version of SC4 will stop working if you install Windows Update KB3086255".

When I used a script to start SC4 (to circumvent the issue that MS caused with their update), my DAMN menus were blank. What I found, though, is when I set the driver's service manually (i.e., not through a script) the DAMN menus appeared normally.

For my system (I'm on Win7, too) I simply type:

sc config secdrv start= demand

at an elevated command prompt.

Hope it works for you as well. Good luck.

shanghai kid

Thank you for the reply and tip, YouBet  :thumbsup:

I was thinking about that maybe, if i did it manually instead of the script the damn would work, but i didn't test it.
I'll test when i try playing again, to see if it works :)
Shanghai kid from Norway
"The lurking devil"
(Bam Bam Bigelow & Eddie Guerrero R.I.P).

Jack_wilds

I am liking a refresher on how to install this program and then how to use it... it will not or that is the 'green button' -whatever it is called,to activate or damn the current package will not work as its dimmmed out... I have FULL permissions YET I must still use "run as admin" to open the program... aid in this matter would really help... THX

brick_mortimer

Hello Yild!

First of all, thanks for creating this usefull program  &apls

I have a small problem with a CTD when plopping a hidden lot:
It's the VIP post office by vnaoned http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=3002

I'm using v.1.3.1 of the DAMN manager.

I already solved the problem by 'unhiding' the submenu with this lot.
It's only a small sub-submenu, so the lots in it don't take up a lot of space in Landmark menu (which is already very empty thanks to the DAMN manager ;) )

So this is just an FYI that might help you.

Greetings B & M
Busier than a one legged man in an ass kicking contest
Me no coffee function without so good

Ldubz

Quote from: hellodave on June 30, 2014, 11:27:55 AM
It seems there are quite a few reasons that cause the dreaded blank menus, I tried everything in this thread with no luck, until...

Quote from: Manwith Noname on August 31, 2013, 09:08:36 AM
...

In short, try deleting the damndesign.dat file found in the DAMN\Support folder.

...

Hope this helps someone.



This helped me, thank you Manwith Noname.
Thank you to everyone who worked through these issues before I got here :)
While I'm handing out thanks, thanks Yild! I love the Damn Manager!


Oh my god this did it. Holy biscuits.

I just reinstalled on windows 10 through origin, and on this one and my old computer, my menus were always blank. I had had it working at one point on the old computer and then it just didn't work anymore (I think I updated DAMN but not sure, it's been a while). I've tried every solution I could find and just came across this and it works. Oh thank you so much, it works!! <3333

APSMS

I got a wild hair recently and tried to open the latest version of the DAMN Manager (1.3.1) on my Windows 7 laptop.

Initially it told me that DAMN was not installed (very weird), and installed some files. But then, nothing. DAMN Manager refuses to open; there is a DAMN Manager process listed in Task Manager, and I can produce multiple instances of it when I try to reopen DM unsuccessfully, but I can't get it to open.

I added DM to my Antivirus Whitelist in case that was causing issues, but so far no dice. Has anyone else had this problem recently? Yild, you around with any ideas?

EDIT: I noticed that someone on ST said that a program they were running was preventing DM from running, or rather, that when said program was running, DM would not. I've been trying to pare down running programs/processes, but again no luck. I will continue and post back. FWIW, SSPtool does work for me, but it's little outdated and I was hoping to take advantage of some of the newer features in Yild's program.
Experience is something you don't get until just after you need it.

My Mayor Diary San Diego: A Reinterpretation

YouBet

My experience with the DAMN Manager was similar to yours, APSMS (I run Win 7 as well). Specifically, DAMN would not run with any of the following running...

A previous instance of DAMN running (i.e., process still running according to task manager),
Windows Explorer open, or
Internet Explorer open.

Absent these three, my computer would run DAMN properly. Perhaps nothing you didn't already know, but maybe it will help a bit.


APSMS

How do you close Windows Explorer without crashing your computer or being unable to use basic functions?
Experience is something you don't get until just after you need it.

My Mayor Diary San Diego: A Reinterpretation

Dublin

Windows explorer is running when you have your folder open. just click start damn mgr and click off the folder window it is in. The folder window is what windows explorer is running. HTH
Where ever you go, there you are.

matias93

#198
Alternatively, if you are using a batch file to start the executable, you can forcibly close the explorer, and as the batch has to work sequencially, it won't restart it until the progrmam is closed. This looks like



taskkill /F /IM explorer.exe ::finds explorer and closes it in a non-friendly manner
::your command for running the program
explorer.exe ::restarts explorer but only after the game closes

"Lets be scientists and as such, remember always that the purpose of politics is not freedom, nor authority, nor is any principle of abstract character,
but it is to meet the social needs of man and the development of the society"

— Valentín Letelier, 1895

jschlegel48

 :angrymore: HELP!!!

I have the dreaded blank screen (window) when I attempt to open DAMNManager within the game (SC4D). I get the menu navigation buttons, (left arrow, home and search (?)) but no other data. When I do a search it indicates the menu item found but still nothing displays.

I've read most every post in this thread and attempted all the "fixes" without success.

1. Moved the executable file (*.exe) out of the apps folder.
2. Closed all other windows, i.e., explorer and web browser.
3, removed the damndesign.dat file
4. watched task manager
    shows SC4 open but does not show Damnmanager running when i attempt to open it within the game.
    shows manager running when opened outside of SC4
5. I usually start SC4 from SC4Launcher but did try opening the game directly from the exe file.

I'm running a drive with the XP operating system with the proper version of java. I have more than enough memory as it is a 6 core chip with 32GB.

I must be missing something???

Please help.  Additional info on request.

Thanks,

John