1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Modder's Guide to Final Frontier Plus

Discussion in 'Civ4 - Final Frontier Plus' started by TC01, May 28, 2010.

  1. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    The text has nothing to do with the CarrierUnitAI. It is defined purely via the tag given in the special unit's Description tag: TXT_KEY_SPECIALUNIT_PEOPLE in this case.
     
  2. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,414
    Location:
    Britain
    :blush: Doh! I get it now, I'll find the relevant file tonight when I get home and make the necessary adjustments.
     
  3. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Joined:
    Dec 30, 2007
    Messages:
    1,414
    Location:
    Britain
    I found it, copied it and amended it. It also put me on to some other stuff that needed 'adjusting' so the flavour of the text is more in keeping with a Sci Fi setting.

    Thanks for the help.
     
  4. cpt.tripps.2012

    cpt.tripps.2012 Chieftain

    Joined:
    May 25, 2012
    Messages:
    176
    @TC01 et al.

    I've also asked this question on TC01's Python Action button tutorial thread:

    I used the technique you described in Python Action button tutorial to make my buttons in Star Trek mod II and it worked just fine. But now that I am using FFP instead of the original STM as a base for the game (as you already know) and now it isn't working. Instead what happens now is the new buttons don't appear and all the buttons just freeze up. Do you know what that is? Does it have something to do with the DLL or maybe the bug mod? I'm trying to figure it out so I can put my action buttons back in the game. Thanks.
     
  5. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Unfortunately, I have no idea, though off the top of my head I'd guess it would be BUG. That's the only major interface changes that have been done.

    I don't really know anything about BUG- God-Emperor was the one who did the merge- and the action buttons thing has definitely only been tested without BUG. BUG makes enough interface changes that I could easily imagine it might be related to the problem.

    As one of the things I was going to do if I ever got around to doing more work on FF+ was adding cloaking... I may look into this, but if you're not getting any actual Python exceptions (I assume you have logging on, and have checked the log files?), at the moment I have no idea.

    Perhaps asking the BUG team might help, to see if they know anything about creating action buttons compatible with BUG?

    You might consider trying to add the action buttons to the DLL, although I believe this is a rather complicated and annoying process. (I've also never attempted it).
     
  6. cpt.tripps.2012

    cpt.tripps.2012 Chieftain

    Joined:
    May 25, 2012
    Messages:
    176
    Okay. I'll check with him. That's one of the things I'm going to be doing is adding the cloak in from the original STM, so when it comes together I'll let you know.
     
  7. Anonimasu

    Anonimasu Chieftain

    Joined:
    Oct 24, 2011
    Messages:
    24
    I would love to mod FF+ but I'm not sure where to begin. All I want to do is revert the religions back to Vanilla (for fun!) and change the Civilisations. I've had fun doing this to BTS, but FF+ looks a little more complicated than BTS. Would you be able to post some instructions on how to do this?

    - adding civilisations
    - adding in leaderheads
    - changing leaderhead background
    - reverting or changing the religions

    I think I've got the XML stuff sorted out but I'm not sure.
     
  8. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    It ought to be the same for all those things, except the leaderhead background and foreground effects that are applied and gamefont problems with the religions.

    The leaderhead modifications are done via the definitions of REPLACE_LEADER_BACKGROUND and REPLACE_LEADER_FORGROUND in the CIV4ArtDefines_Misc.xml file. If you empty out the NIF and KFM tags, like they are in the regular BtS file, it should remove the effect used by FF, if that is what you had in mind. If you want to keep the effect and were wondering how to apply it to other leaderheads, you don't - it is done for you by those settings (or it should be, anyhow).

    The religion icons for the regular religions are not present in the GameFont.tga and GameFont_75.tga files used by FF/FFP. They have been completely replaced by the FF religion symbold (and the extras removed). You'd need to put them back. You can't just use the regular BtS version of this file since there are other changes: the delta and omega symbols replace 2 of the regular symbols, anf the resources are arranged differently as there are a lot fewer; that's all I can think of but it means it is probably slightly easier to just change the religion icons in the FFP versions of these files. For simpicity, and sanity preservation, I'd recommend using this nice tool to modify the evil gamefont files: Asaf's Game Font Editor.
     
  9. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    This might be a pretty dumb question, but why is this actually necessary? I mean, I know the XML points to the GameFont*.tga files in a handful of places. But surely we can change it to simply not point to the GameFont*.tga files?

    I'm assuming there must be some reason we have put up with the GameFont thing all these years... perhaps my memory is failing after several years of not being heavily involved in Civ modding. :( (And I'll admit I haven't investigated this at all myself yet before asking here... wanted to do a sanity check first) But quite recently I was thinking about this and realizing that- I never actually wondered if Civ would completely break if we tried to get around using the GameFonts system... I never actually attempted this. I just sort of assumed it was needed.

    Is the whole GameFont*.tga stuff hardcoded into the executable somewhere?
     
  10. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    The symbols from the gamefont file are what appear mixed in with the regular text. Like in the civilopedia entries, hover help, the city billboard, and probably other places. It is literally mapped and used as a font with the various symbols for resources, religions, etc. mapped to the unicode font at values past the normal text glyphs - as I recall some of them are put into a symbol section that has some empty glyphs and is otherwise mostly arrows pointing in various directions. So to get them into the text it just uses a "wide" character format for the text string and specifies the unicode value for the glyph.

    In at least one place, the actual font characters shown are from those .tga files too: the text on the city billboard is using it. This is why that text is different from the other text in FFP as the glyphs in the gamefont files are in a serif font but the font used in most places is a sans-serif font: Trebuchet MS (which is somewhat odd since FF and FFP come with a Verdana.ttf file in the Resource/Fonts folder which is not used for anything).

    Theoretically, the symbols could be done from button like graphics, much like how the promotions appear for the hover help for units. That embeds html-like image tags in the text which the game engine does the substitutions for.

    I think some of the text that uses the gamefonts is generated in the .exe. There is some function in the DLL involved for some of it that I can vaguely recall (I'm not looking it up either just now), but I don't think all of it is generated in the DLL and the part of the .exe involved may not parse the text to do the image substitutions like the hover help does for unit promotions even if it turns out that you can fiddle with all of it.
     
  11. DarkLunaPhantom

    DarkLunaPhantom Chieftain

    Joined:
    Feb 4, 2013
    Messages:
    276
    What causes functions from FinalFrontierGameUtils.py being called when DLL calls them (instead of functions from CvGameUtils.py)? I've looked through BugGameUtils etc., but I cannot find any reference to the FinalFrontierGameUtils.py file itself.
     
  12. God-Emperor

    God-Emperor Chieftain

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    It's in the BUG configuration files. The file Assets\Config\init.xml has a line that says "<load mod="Final Frontier Plus"/>" which causes it to load the configuration in the file "Final Frontier Plus.xml" from that same folder. In that file is where it specifies loading the FinalFrontierEvents and FinalFrontierGameUtils files for the events and gameutils functions.
     
  13. BardronVIII

    BardronVIII Chieftain

    Joined:
    Mar 18, 2016
    Messages:
    1
    Where basic planet yields :)food:, :hammers:, :commerce:) data are stored (in which XML file)?
     
  14. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    They are not stored in XML ("yet") because planets and solar systems are not implemented in C++ (also "yet"). You want to take a look at CvSolarSystem.py, instead, where this information is more or less hardcoded at the bottom of the file.
     

Share This Page