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

[MODCOMP] Civilopedia Promotion Info

Discussion in 'Civ4 - Mod Components' started by talchas, Mar 19, 2006.

  1. talchas

    talchas Chieftain

    Joined:
    Jan 3, 2006
    Messages:
    428
    This mod adds a Civilopedia tag to the CIV4PromotionInfos.xml that is displayed after all the regular promotion info in the pedia. Apparently, the Civilopedia field was in there, but unused. All this is is a new copy of the schema for the promotion xml file, a changed promotion pedia page, a new promotion xml file with Civilopedia tags inserted and a new Text xml file (optional, but good for organization). Combat 1 has something in its pedia tag as an example.
     

    Attached Files:

  2. TheLopez

    TheLopez Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Good work talchas, Screenshots?
     
  3. talchas

    talchas Chieftain

    Joined:
    Jan 3, 2006
    Messages:
    428
    Screenshot added and correct version uploaded.
     
  4. Zuul

    Zuul Mod lister!

    Joined:
    Nov 13, 2005
    Messages:
    1,117
    Location:
    Sweden
    Nice, thanks. :)
     
  5. TheLopez

    TheLopez Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    One question though, you can only add one item using the tag or can you add multiple items?
     
  6. talchas

    talchas Chieftain

    Joined:
    Jan 3, 2006
    Messages:
    428
    I believe you can put multiple items by doing [NEWLINE][ICON_BULLET(or whatever I used for the bullet before)]. I'm not sure if [NEWLINE] works though, I'm at a comp w/o Civ4 right now.
     
  7. naf4ever

    naf4ever Dread Lord

    Joined:
    Feb 8, 2003
    Messages:
    405
    Location:
    Southeast Washington State
    Think there will ever be a way to do this for traits and civics to add more descriptions to them for ones that have had features added to them via python but which dont show up as effects when viewing them? For example in FfH which you work on,, being able to have a description about the enslave chance when viewing the slavery civic, or the fishnet bonus from seafaring?
     
  8. Kael

    Kael Chieftain

    Joined:
    May 6, 2002
    Messages:
    17,401
    Location:
    Ohio
    Yeap, this is one of the ones I use and it works great:

    Code:
    	<TEXT>
    		<Tag>TXT_KEY_PROMOTION_FIRE2_PEDIA</Tag>
    		<English>[ICON_BULLET]With Summoning 2 allows the unit to cast Conjure Fire Elemental.[PARAGRAPH:1][ICON_BULLET]With Sorcery 2 allows the unit to cast Fireball.</English>
    	</TEXT>
     
  9. talchas

    talchas Chieftain

    Joined:
    Jan 3, 2006
    Messages:
    428
    Dunno, what I did may well work for those things - anything which inherits from CvInfoBase should be able to load a <Civilopedia> tag if you add it to the schema. Then you would just have add the Civilopedia text in the python before adding it to the big text box.

    With the SDK, then almost certainly.
     
  10. Zuul

    Zuul Mod lister!

    Joined:
    Nov 13, 2005
    Messages:
    1,117
    Location:
    Sweden
    This info will be included in next version of my promotion mod.
     
  11. TheLopez

    TheLopez Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    I just wanted to bring something up before any mod component makers include this change. Understand that if we do start changing the schema it could potentially make it harder for people to merge the different components together.

    Any thoughts on this topic?
     
  12. Zuul

    Zuul Mod lister!

    Joined:
    Nov 13, 2005
    Messages:
    1,117
    Location:
    Sweden
    Yes it will be somewhat harder, but I was thinking on adding promotions like you new ones into mine. But maybe not.
     
  13. Zuul

    Zuul Mod lister!

    Joined:
    Nov 13, 2005
    Messages:
    1,117
    Location:
    Sweden
    Ups double post.
     
  14. TheLopez

    TheLopez Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Well, I have been trying to use your promotions when possible to make merging our mods together as easy as possible :).
     
  15. TheLopez

    TheLopez Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    Talchas, can we make a slight change to the CIV4UnitSchema.xml file in your zip?

    Can you change line 669:
    Code:
    <element type="Civilopedia"/>
    
    to:
    Code:
    <element type="Civilopedia" minOccurs="0"/>
    
    This way if someone merges a mod that uses your new modified CIV4UnitSchema.xml file they won't have to update every single promotion in the CIV4PromotionInfos.xml file? I have already tested it and confirm that this change works.
     
  16. mikezang

    mikezang Pegasus

    Joined:
    May 6, 2002
    Messages:
    465
    Location:
    Tokyo
    After I install this MOD, I found all units in cities are running, I don't think this is good, what do you did in your MOD?
     
  17. TheLopez

    TheLopez Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,525
    Location:
    Oregon
    What do you mean they are running??
     
  18. talchas

    talchas Chieftain

    Joined:
    Jan 3, 2006
    Messages:
    428
    I'd considered doing this, but I left it out because its more in keeping with how Firaxis did things and a single find/replace can fix it. However, I have changed it, as it is easier.
     
  19. mikezang

    mikezang Pegasus

    Joined:
    May 6, 2002
    Messages:
    465
    Location:
    Tokyo
    They are in animation mode, looks like running, all units in all cities are running!!
    You never saw this terrible thing?
     
  20. talchas

    talchas Chieftain

    Joined:
    Jan 3, 2006
    Messages:
    428
    I can just about guarantee that this has nothing to do with my mod because this mod only changes the civilopedia, nothing else.
     

Share This Page