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

Quick Modding Questions Thread

Discussion in 'Civ4 - Creation & Customization' started by kiwitt, Jan 27, 2010.

  1. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    If you are doing an SDK mod, it's easier to comment out the part of the SDK that logs that info. See, what happens is that it searches in the info-table for NONE, and since it is not found, it returns a -1. A -1 is what you want, so nothing bad happens.

    But yes, you can change those lines.
     
  2. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    Thanks I get rid of the "NONE". RE: SDK Mod learning I wait for Civ 5.
     
  3. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    Liberating cities. I need a couple of my mod's cities to have the choice to be liberated and returned to a specific civilization from the start of the mod. I've messed around with culture and territory, but can't edit it with worldbuilder. Any thoughts?
     
  4. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  5. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    I have received a question from a potential user of my Mod, whether it will be compatible with a MAC.

    My mod uses the "Vanilla" DLL, that came with "Beyond the Sword". It uses new units from the units database and the rest of the changes are Worldbuilder edits and XML additions and changes.
     
  6. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,138
    Location:
    DE/NL/FR
    3 things for Mac:
    - Can't use any custom dlls. If it's requiered, it will just not work.
    - Can't use .exe files, so you have to provide a .zip, .rar, whatever
    - XML reading is a bit different. Some characters (special ones, like ö,ä,ü,á, and so on) can cause problems. There are also potentially some more XML problems, but these can be fixed with a helping hand of a Mac user.
     
  7. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    So I created a nif file for a building, but lthe top of one part of the building shows up as black, but the .dds shows it should be colored grey. Can't figure it out. The only thing I can think of is that this section has not building bottom. Is that it? any suggestions?
     
  8. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,138
    Location:
    DE/NL/FR
    For graphical questions you maybe should open a new thread, because graphical modders will then be more likely to look in it (if the title says, what the problem is).
     
  9. Wulfnoth

    Wulfnoth Chieftain

    Joined:
    May 5, 2010
    Messages:
    6
    Hi.

    I've tried to find this but with no luck. What file do I use to modify units and where is it?
     
  10. Mr Blue

    Mr Blue Chieftain

    Joined:
    Sep 11, 2009
    Messages:
    35
    Location:
    the pits of hell
    Assets/XML/Units/CIV4UnitInfos
     
  11. Wulfnoth

    Wulfnoth Chieftain

    Joined:
    May 5, 2010
    Messages:
    6
    Thanks
     
  12. Wulfnoth

    Wulfnoth Chieftain

    Joined:
    May 5, 2010
    Messages:
    6
    All Right. This leads to my next question: what do I do with an xml document? How do I modify it and save it to use for a mod? I suspect that this question has been answered before but I could not find it, so I would be happy if someone just directed me to prior posts that have the information I seek. I should add that I am not a programmer or the like so start out with little knowledge, but I have always been able to learn whatever I need in order to do what I want to do. As I said before, I have made my own civ mods before on the earlier versions but I am not familiar with the current methods.
     
  13. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    For modifying an XML file there is no programming involved. It is just a text file that holds data in a specific format. To some extent they are self explanatory since every piece of data is labeled (although some are not very clear in meaning), and you can use the documentation in the Modiki (link near the top of the page) for more info.

    It is a bit easier if you use an editor that is better than Notepad (which does work OK) or Wordpad. I would recommend against using use Word or other MS Office products - some of them think they understand XML but they are terrible at it. Notepad++ is popular.
     
  14. Wulfnoth

    Wulfnoth Chieftain

    Joined:
    May 5, 2010
    Messages:
    6
    Thanks. My problem was that when I clicked on it, it went to a page online. I wasn't sure what to do about that. I didn't open it with notepad or anything else like that. Thanks. Now that I am able to read it as some form of text file, it seems pretty clear at the moment.
     
  15. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    I forgot that the default response to just clicking on an XML file to open it in most versions of Windows is to do something stupid. It would be better if it just defaulted to opening it in Notepad.
     
  16. w2w2w

    w2w2w Warlord

    Joined:
    Jul 26, 2009
    Messages:
    120
    --------------------------------------------------------------------------------

    1. How can I do it so you can only get a certain promotion or another. (so if you got your 2 xp you chose heavy plating over light plating and then when you got 5 xp light plating wasnt there any more.)

    2. What XML editor should I get so that way I can do <bshowNationality>1<bshowNationality> and turn that into a promotion. or if I wanted a promotion to allow bombardment after you achieve it (I know there are some mods out there that can do this but id rather do it my self and get the better editor in the process)

    right now my editor only edits it cant add scripts <-------- help with that too?
     
  17. El_Salmun

    El_Salmun Chieftain

    Joined:
    May 5, 2010
    Messages:
    23
    Location:
    Belgium
    Hi,

    I've got a quick question:

    is it possible to change a unit's model when it gets a certain promotion? E.g. a rifleman gets the promotion "woodsman" and then a model of a rifleman with leaves camo is used in stead of the original. I know u can add models like with the city-attacker promo that adds attachking siege towers, but it's REPLACING the unit model I'm talking about.

    If it is possible, how could it be done?
     
  18. The_Coyote

    The_Coyote Emperor

    Joined:
    Mar 1, 2008
    Messages:
    1,367
    Location:
    Europe
    changing models is possible - eg the same way you want (different models depending on promotions) has atm the planetfall mod. No idea if it´s was only a python or also a sdk change.

    Also there is way to run a certain kf with promotions (like the added parts in der afterworld scenario - theoretical - because i don´t know a mod or model beside the vanilla one - you could use this function and change the UV on the texture position (the way it´s done with damage stats texture))
     
  19. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    33,138
    Location:
    DE/NL/FR
    Both needs some serious C++ coding, no way with XML or python scripting.
     
  20. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    I have lost a utility I had which extracted the XML file into a spreadsheet.

    I can't find it under Civ4 Utility Downloads
     

Share This Page