PDA

View Full Version : Announcing catgod, a pretender file viewer


Evil Dave
April 15th, 2007, 11:49 PM
Catgod is a command-line program to display Dom3's pretender god files. For example:
<tt><pre>
>catgod /Users/evil/dominions3/savedgames/newlords/early_arcoscephale_0.2h
Fred, the Earth Monster, Lord of Courage, God of Mountains
Arcoscephale, Early Era
Cyclops (Body 156, 91 hits)
Magic: Earth 9
Dominion 5
Scales: Order 1 Productivity 1 Fortune 1 Magic 1
Dormant</pre></tt>

Catgod understands wildcards like you'd expect:

<tt><pre>
>catgod /Users/evil/dominions3/savedgames/newlords/early_arcoscephale_?.2h

----/Users/evil/dominions3/savedgames/newlords/early_arcoscephale_0.2h----

Fred, the Earth Monster, Lord of Courage, God of Mountains
Arcoscephale, Early Era
Cyclops (Body 156, 91 hits)
Magic: Earth 9
Dominion 5
Scales: Order 1 Productivity 1 Fortune 1 Magic 1
Dormant

----/Users/evil/dominions3/savedgames/newlords/early_arcoscephale_1.2h----

Jane, Mother of Fishes, Goddess of Rivers
Arcoscephale, Early Era
Mother of Rivers (Body 1342, 95 hits)
Magic: Water 9
Dominion 5
Scales: Order 2 Productivity 2 Fortune 2 Magic 1
Imprisoned
</pre></tt>
Binaries are available for Linux/Intel and Macintosh OS X/PPC.

Download catgod for <a href = "http://www.omskivar.org/evil/dom3/linux-intel/catgod">Linux/Intel</a>.

Download catgod for <a href = "http://www.omskivar.org/evil/dom3/osx-ppc/catgod">Macintosh OS X/PPC</a>.

(If you click one of those links and your browser shows a page of random characters, back up, and download it with right-click "Save as...", or whatever your browser uses.)

I don't have the tools or the inclination to port catgod to Windows. If somebody wants to, send me a PM. Porting it shouldn't be hard; it's a short C program. Likewise if somebody wants to recompile it for Mac OS/Intel.
<hr>
Installation and Usage Example

Download catgod into any convenient directory. Start a shell (Terminal in Mac OS), <tt>cd</tt> to that directory, and

<tt>chmod +x catgod</tt>

in case it didn't download as executable. If you used the default Dominions installation, your pretender files will be in

<tt>/your home directory/dominions3/savedgames/newlords</tt>

so,

<tt>./catgod /your home directory/dominions3/savedgames/newlords/*.2h</tt>

will display all your pretenders. If this doesn't make sense to you, ask your local computer geek for help. http://forum.shrapnelgames.com/images/smilies/happy.gif

A copy of this documentation (such as it is) lives at <a href = "http://www.omskivar.org/evil/dom3/catgod.html">http://www.omskivar.org/evil/dom3/catgod.html</a>, the catgod home page.
<hr>

Thanks to Gandalf Parker for testing catgod.

llamabeast
April 17th, 2007, 08:29 AM
This sounds like quite an impressive project. I'll have to take a look.

Can it look at pretenders that are password protected? If so, it could be used for evil. Wouldn't want that.

Dedas
April 17th, 2007, 08:41 AM
Excellent! http://forum.shrapnelgames.com/images/smilies/happy.gif

But it seems that your links all leads to 404 at the moment.

mathusalem
April 17th, 2007, 10:07 AM
really good idea !

And a version for Mac, thanks !

Gandalf Parker
April 17th, 2007, 11:44 AM
Was that old dom2 code for dumpgod.c useful in the beginning?

You should rename it. Not everyone knows that "cat" is the linux command for dumping text output to the screen. Maybe printgod.

Now if you could get catgod to kick out the points left over. Then we can do nation-bidding games based on creation points. Does anyone have a table for point costs?

thejeff
April 17th, 2007, 11:57 AM
Yeah, I keep seeing this thread and thinking "Bast?"

And I'm a linux geek so I know where the name comes from...

Evil Dave
April 17th, 2007, 12:29 PM
General reply to all comments:

If you tried to download catgod and couldn't get thru (bad links, etc), please give it another try. A storm that came thru here Monday morning not only knocked out power to my servers, but also messed up the 'net but good. Even when the power came back, access beyond my ISP was in yo-yo mode.

If somebody can think of a better name for catgod, I'm all ears. I'll take "printgod" if I have to, but I'd like something more clever. And I was thinking of just calling it Bast, in the long tradition of obscure Unix command names. http://forum.shrapnelgames.com/images/smilies/happy.gif

Catgod can read password-protected pretenders. You'd need to have access to the file to read it, tho. If this is a problem for MP, the host machine should change the file protections on uploaded pretenders so that only the game server and each pretender's player can read the files.

Oh, I didn't know there was a dumpgod. http://forum.shrapnelgames.com/images/smilies/happy.gif Programming catgod took only 10-11 hours, about half of which was figuring out the file format.

Gandalf Parker
April 17th, 2007, 02:22 PM
How about GodDump http://forum.shrapnelgames.com/images/smilies/happy.gif
GodGuts? CatScan? Atheism?
Or how about something befitting "seeing the gods"
Babel? http://en.wikipedia.org/wiki/Tower_of_babel

PDF
April 17th, 2007, 04:55 PM
Hi, nice idea, I'd just need a Windows version to be able to use it ...

mathusalem
April 17th, 2007, 06:23 PM
where did you find how to parse .2h files ?

can we have source code, just for seeing how it's work ?


Thanks ^^

ajr
April 17th, 2007, 07:54 PM
Gandalf Parker said:
Does anyone have a table for point costs?



I don't have a table, but with the work done by Evil Dave and Edi, this is easy to code up;
http://rupes.dyndns.org/~ajr/dom3/godpoints
took me maybe 45 minutes. It takes catgod's output on stdin, and requires pretenders.csv in the same directory (which has some requirements as to field names and lines, but using the Pretenders pane of Edi's spreadsheet will work), and outputs the points spent. I haven't tested it extensively, but it seems to work on a few random pretenders I threw at it.

Gandalf Parker
April 17th, 2007, 07:55 PM
I dont think there is a "where" on the formats. But I know of 3 people now that have worked it out on their own.