Results 1 to 4 of 4

Thread: Vaguely technical question about graphics

  1. #1
    slowmotionlight
    Settler
    Join Date
    24 Jan 2011
    Posts
    11
    Country
    This is slowmotionlight's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:37

    Vaguely technical question about graphics

    This is a question about the graphics formats used by CTP 2.

    The unit animations are listed as .spr. Would I be correct in assuming that this not an industry standard file type? I've been google-ing about sprites because I want to add my own unit graphics (of course) and I haven't found any reference to the .spr file type, only .bmp .gif .tiff etc. From what I can gather 'sprite' is simply a generic name for a sequence of bitmaps and CTP uses .tiff for these. Is the format that CTP calls 'sprite' proprietry? I have browsed some of the conversion threads but they don't seem to tell me exactly what the .spr files 'are' exactly, other than the graphics files for the game. How exactly are they made out of .tiff for example?

    I hope someone understands what I am talking about.

  2. #2
    BureauBert
    Senior Staff BureauBert's Avatar
    Join Date
    13 Apr 2003
    Location
    Vienna, proud home of bureaucracy
    Posts
    297
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    23:37
    I think the *.spr-format has to be considered "proprietary", actually it is a sort of "container" for the images the unit animation requires (various directions, various kinds of movement etc. ...) and the "animation rules".

    If you wish to add sprites to the game you basically need to create a set of TIFFs. There's a utility for merging this set of images into a *.spr-file: MakeSprite. This utility also contains sample "scripts" for adding standard rules to the different kinds of sprites (units, goods, or cities) -- so you usually don't need to worry about those rules. You will find a couple of guides for sprite creation here (I recommend to read the part about pure black and the "alpha channel" carefully).

    Creating sprites for units like ships, airplanes, or tanks without "full" animation is fairly easy. Creating full animations for "walking" (infantry etc.) units is much more difficult -- you will see what I mean if you take a look at the current unit sprite list
    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

  3. #3
    slowmotionlight
    Settler
    Join Date
    24 Jan 2011
    Posts
    11
    Country
    This is slowmotionlight's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:37
    Quote Originally Posted by BureauBert View Post
    I think the *.spr-format has to be considered "proprietary", actually it is a sort of "container" for the images the unit animation requires (various directions, various kinds of movement etc. ...) and the "animation rules".

    If you wish to add sprites to the game you basically need to create a set of TIFFs. There's a utility for merging this set of images into a *.spr-file. This utility also contains sample "scripts" for adding standard rules to the different kinds of sprites (units, goods, or cities) -- so you usually don't need to worry about those rules. You will find a couple of guides for sprite creation. (I recommend to read the part about pure black and the "alpha channel" carefully).

    Creating sprites for units like ships, airplanes, or tanks without "full" animation is fairly easy. Creating full animations for "walking" (infantry etc.) units is much more difficult -- you will see what I mean if you take a look at the current unit sprite list.
    Thanks for the answer. I have a couple more questions if you don't mind:

    1. Would I be correct in assuming that animations are essentially a matter of having all the required .tiffs and entering the names of these .tiffs into the script, or is there something more to it than that? So let's just assume I have a number of correctly named .tiffs each of which is an appropriate frame of animation. I now the rest of making the animated sprite a matter of creating the script and running Makesprite?

    I am looking to automate a lot of this process. I have Gimp and there are scripts that can auto-cut up sprite sheets and create images from the layers or simply cut up gifs and do the same; converting them or creating them as tiffs is pretty much a matter of either finding or writing the script. There are plent of apps that can batch rename files so it seems a lot of innanity can be removed from the operation. If I can find someone who knows the ins and outs of CTP 2's arcane mysteries then asking pointed questions saves me hours of hacking around myself. I want to get this image-adding out of the way as a first step to getting deeper into the game. I have a limited background in programming (Java and C/C++) and after this am going to look at the source code as I have some ideas on revamping the trade system and making it somewhat akin to reality, rather than either a vague diversion (as it is now) or a mindless exercise in pre-scripted micromanagement (as a lot of suggestions seem to be). Ambitious yes but I look at this as a long term project to get my programming skillz back and up.

    Sometimes I wonder if it wouldn't be better to simply start fresh and write a whole new game

  4. #4
    BureauBert
    Senior Staff BureauBert's Avatar
    Join Date
    13 Apr 2003
    Location
    Vienna, proud home of bureaucracy
    Posts
    297
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    23:37
    animations are essentially a matter of having all the required .tiffs and entering the names of these .tiffs into the script
    Yes, that's it -- but you don't even need to enter the names into a script, you just need to provide the tiffs in a certain numbered order which is explained in the readme for MakeSpr.

    CTP 2's arcane mysteries
    Well, we do our best to unveil these mysteries. "Learning" CTP2 certainly requires some work and some patience, but it's still worth the effort because the game really offers extensive modding possibilites. It would sure be great if you'd get involved into the SourcecodeProject as well -- I am sure that Martin Gühmann could need some help in this regard.
    The modding knowledgebase: CTP2 Bureau (with CTP2 AE Modding Wiki). Modern Times Mod (work in progress): MoT-Mod for CTP2.

Similar Threads

  1. Technical question
    By d=me in forum Off Topic
    Replies: 10
    Last Post: December 25, 2005, 22:19
  2. Technical question
    By Zoid in forum Off Topic
    Replies: 22
    Last Post: April 15, 2005, 13:09
  3. Technical question
    By ManOWar2 in forum Alpha Centauri
    Replies: 8
    Last Post: February 3, 2005, 20:27
  4. Technical Question
    By jasev in forum The Spanish Civilization Site - Archive
    Replies: 4
    Last Post: February 1, 2002, 08:03
  5. Technical Question
    By Bkeela in forum AC-General/Help/Strategy-Archive
    Replies: 3
    Last Post: July 23, 2000, 17:20

Visitors found this page by searching for:

how to script .spr files

vaguely technical question

powered by vBulletin auto graphics

Bookmarks

Posting Permissions