Results 1 to 3 of 3

Thread: Specify Image Path for historic_event

  1. #1

    Default Specify Image Path for historic_event

    We all know that historic_events will use messenger.tga as their default image if no image corresponding to the event name can be found in the UI folder. My question is if it's possible to specify a different image file similarly to how unit types in EDU can use info_pic_dir and card_pic_dir without having to make a new .tga with a file name corresponding to the event name.

    I have a number of events which use different text but the same image and I'd rather not have a ton of duplicate image files needlessly increasing the mod file size.

    I'm wondering if it's possible to do something like:

    Code:
    add_events
         event historic    event_name factions { england, }
         date        0
         position    x, y
         image image_name.tga   ;made this up
    end_add_events
    On the same note, is it possible to have multiple historic events in one add_events block as in:

    Spoiler Alert, click show to read: 

    Code:
    add_events
         event historic    event_name_1 factions { england, }
         event historic    event_name_2 factions { france, }
         date        0
         position    x, y
    end_add_events

  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,277

    Default Re: Specify Image Path for historic_event

    Question 1: I don't believe so. If all other historic events do have pictures then the fallback one (reading monk in vanilla) isn't used, so you could replace that fallback one with your own, thereby used by your "duplicate" events.

    Question 2: pretty sure you can, hence the plural "add_events", but the syntax might be more like...

    Code:
    add_events
         event historic    event_name_1 factions { england, }
         date        0
         position    x, y
         event historic    event_name_1 factions { france, }
         date        0
         position    x, y
    end_add_events
    Warning: date 0 doesn't work with all turns-per-year settings, e.g. 12TPY. It does work in the first turn.

  3. #3
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,940
    Blog Entries
    25

    Default Re: Specify Image Path for historic_event

    One normally only uses the add_events format for historic events if you wish to make use of the locator button, it is by far more convenient to use the simple historic_event command.

    You actually don't have to worry about file size of duplicated TGAs in installers afaik - I have seen often enough that duplicates hardly require space in the installer, different story on the hard disk. But even then using TGA compression will greatly reduce the file size:

    The default, uncompressed map_climates file size is 656KB (Targa Type 2), the compressed size is 28KB (Targa Type 10). Once again the installer will compress the default file that much during compiling but it will install with the full size.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •