View Full Version : Catgod pretender viewer now for Windows!
Evil Dave
May 16th, 2007, 12:53 AM
PvK has generously taken the time to port <a href = "http://www.omskivar.org/evil/dom3/catgod.html">catgod</a>, everybody's favorite pretender file viewer, to Windows. Three cheers for PvK!
Download <a href = "http://www.omskivar.org/evil/dom3/windows-intel/catgod.zip">catgod.zip</a>. Yup, still command-line only... but Arralen is working on a GUI.
<a href = "http://www.omskivar.org/evil/dom3/osx-ppc/catgod">Mac OS</a> and <a href = "http://www.omskivar.org/evil/dom3/linux-intel/catgod">Linux</a> binaries are still available too.
Once you've downloaded it, change to your pretender directory (usually dominions3/savedgames/newlords), and start looking at files.
<tt>catgod *.2h</tt>
will show them all.
Gandalf Parker
May 16th, 2007, 10:29 AM
Someone could probably whip off a batch file.
Or even a shortcut link to do it as an *.2h
You could include that with the zip until a gui menu is available.
lch
May 16th, 2007, 10:59 AM
IIRC Windows supports drag&drop of files on any executable: Grab a *.2h file (or a bunch of them) and drop them on the catgod.exe - or a batch file like this:
<font class="small">Code:</font><hr /><pre>@echo off
catgod %*
pause</pre><hr />
because otherwise you won't be able to see the output. Haven't been able to test it, but it should work.
Eressil3
May 19th, 2007, 08:37 AM
Thanx a lot ! It works fine and is very usefull.
Arralen
June 15th, 2007, 07:04 PM
Just want to let you know that I'm still working on the GUI wrapper, but I'm busy with real life issues. Even worse, I ran into a bug -as it seems- in the library I planned to use to write the apps settings to an INI file both in Linux and Windoze version, what complicates things slightly. :/ http://forum.shrapnelgames.com/images/smilies/frown.gif
Arralen
June 17th, 2007, 06:46 AM
<h2>catgodGUI 0.1.2</h2>
<h4>the graphical wrapper for catgod</h4>
http://www.nathanael.net/catgodGUI012.png
You can download catgodGUI 0.1.2 build 170607 (includes catgod) HERE (http://www.nathanael.net/_build_170607.zip) .
Here's the readme :
________ SETUP ______________________
There's no need to install anything:
Simply unzip the ZIP anywhere you like and run "catgodGUI.exe" .
Choose "Dominions" and configure your Dominions 3 main directory - most likely something like "c:\programs\dominions3". The newlords subdirectory where the pretender files are stored will be set automatically.
________ USAGE ______________________
Choose "Files", "Re-scan .." and the newlords directory will be scanned for pretender files and the contents thereof displayed. You can cut&paste from the main app windows using "CTRL+C".
________ TROUBLESHOOTING ____________
>>> On startup, the app exits with a "can't read key"-error and tells me something cryptic about the INI file.
Solution:
edit: Delete the contents of the file "application.ini". NOT the file itself.
If you accidently deleted the file, or it got lost somehow, simply create an empty file "application.ini" next to catgodGUI.exe.
Comment:
The error means the INI has become corrupt and the program cannot retreive a
key that is used to store one of the user settings. After deleting the INI file, your setting will o.c. be gone , but at least you'll be able to start up the program again.
If you didn't have an app or the whole machine crash _while_ exiting catgodGUI the last time, I would start looking for troubles with the file system, bad blocks on the HDD etc.
>>> I've set the newlords directory correctly, and catgodGUI says it reads from there, but I don't get any output, and maybe a strange error message.
Make sure there are no non-pretender files in your newlords directory. catgod does not like those ...
edit: application.ini problems
Gandalf Parker
June 17th, 2007, 10:18 AM
Excellent program. (sorry I coudnt help outmore on that)
Excellent intstructions.
Thank you very much.
Caduceus
June 18th, 2007, 12:03 PM
Thanks! I'll load it up tonight!
Arralen
June 23rd, 2007, 02:22 PM
______ MORE TROUBLESHOOTING ____________
As it seems, catgod.exe does not like being fed folders pathes with spaces in them, like e.g. :
"\program files\dominions3\
I'll have a chat with Dave 'bout this, and will try to implement some kind of workaround maybe.
Meanwhile, simply rename/move your dominions folder (or copy the newlords folder) in such a way that there isn't a space in the path names, e.g.:
"d:\programs\dominions3"
Dominions doesn't really care from where it is run - I have multiple versions installed at the same time by copying the folders.
You can only deinstall from within windows software tab where you installed - but you can simply delete the other dominions directories if you don't need them any more.
Gandalf Parker
June 23rd, 2007, 05:04 PM
If it wont accept the newer windows workaround of putting it in quotes..
"program files\dominions3\"
(btw cant lead with a slash)
will it accept the older windows workaround of using a tilde?
progra~1\dominions3\
Arralen
June 23rd, 2007, 05:38 PM
Neither Gandalfs first suggestion
catgod.exe "d:\temp\try this out\savedgames\newlords\*.2h"
nor Peters idea
catgod.exe 'd:\temp\try this out\savedgames\newlords\*.2h'
work from the command line on my system (W2k).
Maybe someone could try on XP etc and let me know, but I don't expect them to behave differently at all.
Gandalf, maybe you could try out the linux (command line) version of catgod on your machine and let me know how it behaves if fed with such a file path ? Thanks!
Maybe, just maybe, I get something like a terminal gui done especially for you. It's very much "maybe" because the ncurses equivalent for Tcl/Tk, the term:: functions in Tcllib, are not yet implemented ...
catgod.exe d:\temp\try_th~1\savedgames\newlords\*.2h'
DOES work - but only if there's no 'space' within the first 6 characters.
As I have a hard time implementing the command line syntax anyway - ", ', \ and / are part of the Tcl/Tk syntax - and shortening the path to "someth~1" would be a nightmare (at least for me), I'll wait for a word from Dave or Peter if there's anything that can be done within catgod itself to get this ironed out.
If not, I think I'll resort to copying the pretender files over and scanning them from a temp/subdirectory ...
Btw., I'm still taking suggestions what functions catgodGUI could/should implement ... .
Gandalf Parker
June 23rd, 2007, 07:36 PM
I think that most people have it in \program files\ so the tilde answer should work for a large group. But personally I would appreciate it if the drive letter was left off.
And I dont like using gui's on linux. That would be for Johan. http://forum.shrapnelgames.com/images/smilies/happy.gif
I prefer text mode command line operation on linux. But I dont think I see a need for this on the server. I would probably use it on my WinXP desktop
PvK
June 25th, 2007, 04:09 PM
That's interesting. I'm still investigating, but so far I see that the quotes do work but only without the wildcard character, e.g.: <font class="small">Code:</font><hr /><pre>C:\PvK\CatGod\catgod\Debug>catgod "C:\Program Files\dominions3\savedgames\newlords\mid_eriu_0.2h"
Thistletwiss, Queen of the Oceans, the Whirlpool, Patron of Farmers
(null)
Lady of Springs (Body 1370, 65 hits)
Magic: Water 9 Nature 4
Dominion 5
Scales: Growth 1 Fortune 1
Dormant</pre><hr /> But if I replace the nation with *, it fails. Maybe I just need to find yet another build setting to tell Windohs to behave better...
Gandalf Parker
June 25th, 2007, 04:35 PM
Yes quotes do not pass wildcards well.
Have you tried with the rest of it outside of the quotes?
C:\PvK\CatGod\catgod\Debug>catgod "C:\Program Files\dominions3\savedgames\newlords\"*.2h
Just wondering. If I remember later on I might test this
Maybe we can create a batch file to take an * and pass them one at a time to CatGod
lch
June 25th, 2007, 06:08 PM
Gandalf Parker said:
Maybe we can create a batch file to take an * and pass them one at a time to CatGod
Why not just use my drag and drop solution? You only need a batch file to do a "pause" after catgod is run, because the window will close after executing, i.e. instantly.
Here is the revised solution, tested now and works:
Create a file named catgod.bat (with notepad or whatever) in the same directory where catgod.exe is and put the following inside: <font class="small">Code:</font><hr /><pre>@echo off
catgod.exe %*
pause</pre><hr />
Then select the Batch file with a left-mouse click, hold your CTRL+Shift key while dragging the file a little and drop it somewhere, for example on your desktop. Name it however you want. When you then drag & drop pretender files on that icon you just created, it will display the stats. Easy, no?
Arralen
June 25th, 2007, 08:09 PM
.. because dragging your pretender files around using Explorer and copying from the CMD line window is slightly inconvenient?
Furthermore, I plan to add some more features to the catgodGUI as soon as we can get the basic functionality right .. http://forum.shrapnelgames.com/images/smilies/wink.gif
Gandalf Parker
June 25th, 2007, 08:37 PM
I was going to say because to most windows users that would be "weird". But a batch file that processes the entire newlords directory, maybe to a file, might not be bad.
lch
June 25th, 2007, 08:51 PM
Arralen said:
.. because dragging your pretender files around using Explorer and copying from the CMD line window is slightly inconvenient?
How so? You can select exactly the files/nations that you want via the explorer window and drop them on the icon. If you want to have better copy/paste functionality, just right click on the icon, select "Properties", then "Options" and enable the "Quickedit" mode. Then you can select text via left mouse button and copy it to the clipboard via right mouse button. It doesn't get any easier than this.
Arralen said:
Furthermore, I plan to add some more features to the catgodGUI as soon as we can get the basic functionality right .. http://forum.shrapnelgames.com/images/smilies/wink.gif
Oh, I don't want to belittle your GUI program, just wanted to point out that there is a very simple solution for this.
PvK
June 26th, 2007, 04:16 AM
Ok, it's looking to me like Windohs params just won't mix quotes with wildcards...
I tried hard-coding:
"C:\Program Files\dominions3\savedgames\newlords\*.2h"
and the file system method doesn't like that parameter in Windohs. Which means it's not necessarily failing just at the command-line level - it looks to like it's both, which is lame.
That is, Windohs does the wildcard expansion on the parameter passing, but not if it's in quotes. It doesn't do it at the file-open level after getting the parameter, which basically means, as far as my sleepy mind can see at the moment, that it's not going to help. Either the calling (Arralen's) program would need to do it, or I'd need to write such a parser myself, including a file system crawler. It would be nice if an escape character could stand in for the space as the parameter is being passed in, but I haven't seen that work from the command-line so far.
Grumble. Time for sleep.
lch
June 26th, 2007, 06:16 AM
PvK said:
Ok, it's looking to me like Windohs params just won't mix quotes with wildcards...
I tried hard-coding:
"C:\Program Files\dominions3\savedgames\newlords\*.2h"
and the file system method doesn't like that parameter in Windohs. Which means it's not necessarily failing just at the command-line level - it looks to like it's both, which is lame.
The problem is not Windows, in a sense, but the catgod.exe itself. Windows command line does not expand wildcards on its own like bash and other shells in Linux does, and has never done so. The catgod.exe has to do that. And as you can see, EvilDave wasn't prepared to have wildcards for paths with spaces in it.
What you could do is to use the "for" command to feed the pretender files to catgod exe, one at a time. See "for /?".
PvK
June 26th, 2007, 01:40 PM
Yes, that's what I meant by "I'd need to write such a parser myself, including a file system crawler." Evil Dave or I, that is.
Arralen
June 26th, 2007, 02:58 PM
Nope, you needn't. I can easily ( http://forum.shrapnelgames.com/images/smilies/rolleyes.gif ) incorporate that into catgodGUI ... or some other way to work around the limitation.
Evil Dave
June 26th, 2007, 11:36 PM
Arralen,
I found a working syntax for XP's command "shell":
catgod c:"\Program Files\PuTTY"\*.2h
It's *extremely* picky about where the quote marks go. It looks like the first one must go after the disk id, and the ending one must preceed a backslash delimiter. Note that
catgod c:"\Program Files"\PuTTY\*.2h
also works. I hope this is standard for all the versions of Windohs.
PvK
June 27th, 2007, 04:14 AM
Oh, cool. I tried something close to that, but it didn't work - as you say, very picky, and the MS docs I found that mentioned the situation didn't explain that.
Arralen
June 27th, 2007, 05:45 AM
Windoze sucks ..
AFAIK, Tcl/Tk is using Win API functions to get me the path the user selects.
I simple store that path and feed it back to the same API .. and it breaks ..
Guess I'll have to implement the workaround: cut off the drive letter, insert quote marks, put it back together .. did I says Windoze sucks? http://forum.shrapnelgames.com/images/smilies/wink.gif
Evil Dave
June 27th, 2007, 11:04 AM
PvK said:
the MS docs I found that mentioned the situation didn't explain that.
I think it's a bug. If the quote marks appear before the disk ID, the shell interprets the entire commandline as tho it was in quotes, regardless of the location of closing quote marks. I was testing the Windohs catgod, and found that playing with the quote marks changed the error from "invalid argument" to "file not found", which suggested a misparse somewhere.
Gandalf Parker
June 27th, 2007, 12:11 PM
Excellent hacking on that. I hope we can make use of it to fix the problem. But in any case that was a sweet find.
happygeek
October 15th, 2009, 07:15 AM
Er, I was directed here from a friendly post on the main forums, and I cannot understand anything anybody said in this thread, and I read it ALL. Are you saying it works in windows or it doesnt? Sorry for being so dense, I can't program my dishwasher. And thank you so much for your time and effort you all put into this.
Arralen
October 15th, 2009, 11:20 AM
Are you saying it works in windows or it doesnt?
It works, unless you have installed Dominions into a folder with a blank in some folder name.
E.g:
C:\program files\games\dominions3 does not work,
C:\programs\games\dominions3 does work
Actually, I would recommend not to install Dominions into a subfolder of c:\program files\, anyway. Better set up a second drive (letter) and install to d:\games\dominions3 or something like that. c: is the system drive and should only be used as such! (esp. true with Fista)
chrispedersen
October 15th, 2009, 11:38 AM
It probably would still work if you had a space, so long as you use the 8.3 nomenclature.
Ie., C:\progra~1\dominions3...
rather than
C:\program files\dominions3...
8.3 is usually 6of the name + ~#, but you can find it with dir /x if I remember.
Arralen
October 15th, 2009, 12:04 PM
catgod could work this way, at least with Win2K/XP, not sure 'bout Fista/7, though.
CatgodGUI would not, simply because there's no (easy) way to use the 8.3 notation: I get the complete folder path from the windoze API, and feed it back ... normally, there shouldn't be any need for tinkering with the path name.
There is a way to do that, but only for those who can program their dishwashers: after configuring the dominions directory, open the application.ini (which is in the folder where you ran CatgodGUI from), and change the path names.
DO NOT use the configuration button afterwards, though!
I haven't tested that, though, so it or might not work !!!
PS: Thanks for bringing this up again - I completly forgot I wanted to do a "workaround" version of CatgodGUI that works with all path names !!!
I'll have a look into it, but don't expect any results too soon !
lch
October 15th, 2009, 01:52 PM
Is there any need for an updated version for 3.23? I don't remember what the last version was that Evil Dave uploaded, but he sent me the source code to compile it, so I could make new versions if anything changed in the latest patches.
Evil Dave
October 15th, 2009, 03:46 PM
I don't recall there being any new pretender chassis in 3.23. But yes, if there are, it's trivial to add them.
lch
October 15th, 2009, 04:08 PM
Ok, I'll leave that to you then.
Arralen
October 16th, 2009, 04:13 AM
I just noticed the website I uploaded the screenshot and the file to does not work any more.
Here's a new screenshot & attached zipfile !
... sorry, but I can't alter the old post, because it's not the 1st in the thread (stupid forum rules ...)
Gandalf Parker
October 16th, 2009, 10:16 AM
Hmmmm.......
Seeing that screen capture made my brain fart again. Apologies all. (DIY implied and acknowledged)
The CatGod program can generate a text file with all of the info on god choice and build.
An option, or another program, could take that and generate GOD files for SemiRand by converting the information to #map commands. That would allow a player to see his own best-builds come up against him in solo games. It would also make it easier for people with many gods they feel are good builds to donate those to the common cause by getting them added to the SemiRand library.
Arralen
October 18th, 2009, 08:02 AM
Nearly forgot:
The above version of CatgodGUI does not have the latest version of catgod packed with it!
Go to
http://www.omskivar.org/evil/dom3/windows-intel/catgod.zip ,
download and replace the catgod.exe in the /bin/ folder !
... sorry for the inconvenience.
I hope I'll get this mess wrapped up soon, but atm I got myself a lumbago and don't feel like doing anything sensible ...
@Gandalf
You don't need another program, you only need this lazy me make the program do those things ...
Gandalf Parker
October 18th, 2009, 11:54 AM
That would be cool.
If I did it Id do it more for my own use. Maybe Id write it to convert incoming god files, then add a disclaimer to a particular game set saying it will happen. Such as all of the vsAI games on my server. "If you play this game be aware that your god build will be converted and stored. You might find yourself fighting an AI in a future game that is playing with your old god build"
Plus, Id do it in BASIC which tends to piss off some people. :)
chrispedersen
April 13th, 2010, 10:04 PM
Hey Arralen and otherwise brainy people.
Can we get a special auction version of catgod?
Something that when you Aucgod <pretender name> it merely spits out the remaining points left... for example.. 7?
I'd like to enable games where bidding (ie., points left) on the pretender are possible.
Once bids are in, we need a handy tool to be able to know if the submitted pretender complies with the auction.
Soyweiser
May 1st, 2011, 06:30 PM
Is there a chance the source code of this program can be released? I'm mostly interested in the parts that reverse engineer the pretender files.
Also the gui crashes if you have any files in your newlords dir that are not pretender files.
Wrana
May 5th, 2011, 09:31 AM
T
Plus, Id do it in BASIC which tends to piss off some people. :)
Bravissimo! :D
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.