1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

UI - Map Pins

Discussion in 'Civ5 - Mod Components' started by whoward69, May 4, 2012.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    "X marks the spot" - enables "pins" to be added to the map

    • Place any number of pins on the map
    • Add "hover" (tooltip) text to the pin
    • 10 pin types (5 coloured flags and 5 others)
    • Edit, move and delete placed pins
    • Toggle all pins on/off (via Shift-X)
    • Pins saved between sessions
    • List of pins added to InfoCorner
    • View, edit, delete pins from InfoCorner list
    • Works in both main map and strategic views
    • Range of Lua events permits pins to be placed and manipulate by other mods

    Use Control-X to enter "pinboard mode" - the cursor changes to a green pin pointer (doesn't show in the screen grabs)

    Spoiler :


    When in "pinboard mode" click on the map to place a pin - a popup dialog prompts for the text to associate with the pin and the "flag" to use



    (Use Control-X or Escape to cancel "pinboard mode" without placing a pin)

    Moving the mouse over the pin displays the text

    Spoiler :


    Right-Click on a pin to edit/move/delete it

    Spoiler :


    Adds an entry to the InfoCorner (top left) to display a list of all pins, sortable by type and notes

    Spoiler :


    From the pin list, click to view, right-click to edit, shift-right-click to delete



    Works in strategic view as well

    Spoiler :


    Modifies the core game files InfoCorner.lua and InfoCorner.xml, so will be incompatible with any other mod that changes these (although the mod works without the InfoCorner changes, you just lose the Map Pin List functionality)

    Edit: For those wanting labels on the map, see this mod "Map Labels"
     
  2. Seek

    Seek Deity Supporter

    Joined:
    Aug 7, 2010
    Messages:
    3,410
    Good stuff as always, whoward!

    TY:D
     
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,318
    Location:
    France
    Great work again ! :goodjob:

    Just launched a quick hotseat game with it (had to test it in that type of game ;) ) and the pins are shown for all player. Do you think a version with public/private pins is possible ?
     
  4. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Thanks

    Some of us do actually use the Compatibility options in ModBuddy ;)

    A hot-seat version is certainly possible (would need to use the same approach as the ResourceIconManager for the pins, and a change to the database table would be needed) - I'll add it the long list of things to do :mischief:

     
  5. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,318
    Location:
    France
    Ho, yes, right, I must add a check for the compatibility option in the custom setup mod (to give at least a fair warning to the user on hotseat game launch). My own todo is updated :D
     
  6. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Version 2 uploaded - (should) now support Hot Seat (thanks to Gedemon for doing some initial testing)

    Also keeps the flag toggle state between sessions (so if you save the game with the flags showing, when you load the game they should still be showing - without the need to Shift-X to turn them on)

    Incompatible with games using version 1 (due to a change to the table that stores the flags)
     
  7. X-Worf

    X-Worf Chieftain

    Joined:
    Feb 21, 2010
    Messages:
    91
    Location:
    Hamburg
    Here is a German translation in case of a multi-language version.
    (delete ".pdf")
     

    Attached Files:

  8. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Many thanks for that, I'll include the translation in version 3 (coming soon!)

    I've added another text entry - "Show/Hide pins" - Google translate is giving me "Anzeigen/Ausblenden Pin"
     
  9. X-Worf

    X-Worf Chieftain

    Joined:
    Feb 21, 2010
    Messages:
    91
    Location:
    Hamburg
    "Show/Hide pins" = "Pins ein-/ausblenden" sounds better
     
  10. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Version 3 uploaded (should be compatible with games using version 2)

    General changes
    • Changed the flower "flag" to the star
    • Added check box on list to show/hide pins (Shift-X equivalent)
    • Includes German translation
    • Shift-Right-Click from the pin list now deletes without the confirmation popup (I figured anybody holding the shift key down while right-clicking probably doesn't need to confirm their action!)

    API changes
    • Pin text can now contain TXT_KEY_ values
    • Added LuaEvents.MapPins_Visibility and LuaEvents.MapPins_SendVisibility
     
  11. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Associated mod uploaded - "UI - Auto Map Pins" -automatically adds map pins for

    • Natural Wonders as they are discovered
    • City States as they are met
    • Unimproved Resources as they are revealed
    Requires the "UI - Map Pins" mod to be installed and enabled
     
  12. bladex

    bladex Emperor

    Joined:
    Oct 29, 2010
    Messages:
    1,358
    i was playing with this today (v2) and later on in the game i could not select, delete or edit map pins. i could add them but they were unelectable after that. they did not show up in the panel either. it's like they were ghost pins.

    confirmed it does this in v3 as well it happened in under 100 turns this time.
     
  13. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,156
    Location:
    Aotearoa
    Awesome work whoward, I'm very happy about this! Amazon, here I come! :D
     
  14. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    By right clicking the pin (to bring up the Edit/Move/Delete pop-up menu) or from the Pin List (right-click to edit, shift-right-click to delete) or both?

    Presumable if you could still add pins, the Notes/Flag entry pop-up was still working.

    Did any Edit/Delete pop-ups appear for the other actions and then not work, or just no menu/dialog pop-ups at all for them?

    Approx how many pins did you have at the time?

    Also, any other major mods installed?

    TIA
     
  15. bladex

    bladex Emperor

    Joined:
    Oct 29, 2010
    Messages:
    1,358
    i'm using nights mod

    i couldnt right click the pins but can add more on all pins
     
  16. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Ta,

    Gives me somewhere to start looking
     
  17. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    I can't replicate this, but then I'm not playing with Nights ...

    I've uploaded V4, which has a couple of minor bug fixes (getting the previous icon and not translating TXT_KEY_s in the hover over), but also leaves all the debug output switched on

    If you feel like it, can you enable logging, load a save game, and then attach the lua.log file when it stops working.

    TIA

    W
     
  18. bladex

    bladex Emperor

    Joined:
    Oct 29, 2010
    Messages:
    1,358
    i forgot to mention i was adding pins with no labels, text?
     
  19. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,417
    Location:
    Near Portsmouth, UK
    Shouldn't make a difference - the pin "text" is the control tooltip and the actual control text is the "flag", and you can have controls with no tooltip.
     
  20. bladex

    bladex Emperor

    Joined:
    Oct 29, 2010
    Messages:
    1,358
    i'm going to play now how do i enable logging?
     

Share This Page