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. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,970
    Location:
    DE/NL/FR
    ...uh...er....why not?
    I don't see anything which could prevent it :).
     
  2. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    Excellent. This will work
    Spoiler :
    Code:
    		<CivilizationInfo>
    			<Type>CIVILIZATION_BARBARIAN</Type>
    			<Description>TXT_KEY_CIV_BARBARIAN_DESC</Description>
    			<ShortDescription>TXT_KEY_CIV_BARBARIAN_SHORT_DESC</ShortDescription>
    			<Adjective>TXT_KEY_CIV_BARBARIAN_ADJECTIVE</Adjective>
    			<Civilopedia>TXT_KEY_CIV_BARBARIAN_PEDIA</Civilopedia>
    			<DefaultPlayerColor>PLAYERCOLOR_BLACK</DefaultPlayerColor>
    			<ArtDefineTag>ART_DEF_CIVILIZATION_BARBARIAN</ArtDefineTag>
    			<ArtStyleType>ARTSTYLE_BARBARIAN</ArtStyleType>
    			<bPlayable>0</bPlayable>
    			<bAIPlayable>0</bAIPlayable>
    			<Cities>
    				<City>TXT_KEY_CITY_NAME_CHEROKEE</City>
    ...
    				<City>TXT_KEY_CITY_NAME_TARTAR</City>
    			</Cities>
    			<Buildings>
    				<Building>
    					<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
    					<BuildingType>NONE</BuildingType>
    				</Building>
    			</Buildings>
    			<Units>
    				<Unit>
    					<UnitClassType>UNITCLASS_WORKER</UnitClassType>
    					<UnitType>NONE</UnitType>
    				</Unit>
    [B]				<Unit>
    					<UnitClassType>UNITCLASS_EARLY_INFANTRY</UnitClassType>
    					<UnitType>UNIT_WW2_PARTISAN</UnitType>
    				</Unit>[/B]
    			</Units>
    			<FreeUnitClasses/>
    			<FreeBuildingClasses/>
    			<FreeTechs/>
    			<DisableTechs/>
    			<InitialCivics>
    				<CivicType>CIVIC_DEMOCRACY</CivicType>
    				<CivicType>CIVIC_JUDICIAL</CivicType>
    				<CivicType>CIVIC_SKILLED</CivicType>
    				<CivicType>CIVIC_FREEMARKET</CivicType>
    				<CivicType>CIVIC_US_USSR_INDUSTRY1</CivicType>
    			</InitialCivics>
    			<Leaders>
    				<Leader>
    					<LeaderName>LEADER_BARBARIAN</LeaderName>
    					<bLeaderAvailability>1</bLeaderAvailability>
    				</Leader>
    			</Leaders>
    			<DerivativeCiv>NONE</DerivativeCiv>
    			<CivilizationSelectionSound/>
    			<CivilizationActionSound/>
    		</CivilizationInfo>
    	</CivilizationInfos>
    </Civ4CivilizationInfos>
    Just getting back up to "modding" speed again ... have some <herp> <derp> moments. ;)
     
  3. The_guy

    The_guy Elephantary School.

    Joined:
    Nov 23, 2010
    Messages:
    64
    Location:
    Holland.
    I just redid the largest part of the upgrade system of my mod, which was (after I added a lot of units, recklessly) a mess. Now though, I have a problem with the Sevopedia, as the Unit Upgrades tab appears empty. Is there anything that I may've screwed up, or are the chains just too long now, perhaps?

    EDIT: Okay, I must've screwed something up, probably graphical, as it turned out that once I removed one units upgrades (even forgetting a UU), it suddenly worked. Wiard.

    EDIT2: Riiiiight, so it's even more mindboggling to me now. If the Chariot here can upgrade to the Horse Archer, it will not show, but if the Chariot only upgrades to the Horseman and the War Elephant, it will work swimmingly. Which is weird. Really weird. Ah well.
     
  4. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    I want to ensure my game supports French, German, Italian and Spanish as well. In the text file, I discovered this
    Code:
    		<German>
    			<Text>Baltikumland</Text>
    			<Gender>Neuter:Neuter:Neuter</Gender>
    			<Plural>0:0:0</Plural>
    		</German>
    Can some please explain this better than the Modiki provides
     
  5. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,970
    Location:
    DE/NL/FR
    You have a very bad example there.

    In some languages words change their plural in another way, and sometimes they also change depending on the gender.
    e.g. president is in German Präsident (male singular) or Präsidentin (female singular), or presidents would be Präsidenten (male plural) or Präsidentinnen (female plural).
    In civ you'd make
    PHP:
            <German>
                <
    Text>Präsident:Präsidentin:Präsidenten:Präsidentinnen</Text>
                <
    Gender>Male:Female:Male:Female</Gender>
                <
    Plural>0:0:1:1</Plural>
            </
    German>
    indicating for every word its gender and if it's plural or not.
    In the example which you picked, the additional entries in the gender and plural lines are redundant.

    (at least that's how I think it works; had not really cared about that in my mod, there was much more important stuff to do than correct genders)
     
  6. kiwitt

    kiwitt Road to War Modder

    Joined:
    Jan 11, 2006
    Messages:
    5,568
    Location:
    Auckland, NZ (GMT+12)
    Thanks. That makes more sense.

    EDIT: I was motivated to do this because of how you list the languages in the modpacks list
     
  7. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,506
    Location:
    Poland
    I find corporations not spreading enough on big maps. Is there any way to make them spread like religions do?
     
  8. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,970
    Location:
    DE/NL/FR
    Just checked the XML, seems they should already do that, but I guess that they cost gold prevents it (which is good; you don't want to see your gold randomly vanish).
     
  9. LuKo

    LuKo The Royal Guard

    Joined:
    Aug 28, 2006
    Messages:
    1,506
    Location:
    Poland
    I thought the same when I checked XML but it's not true. I'm thinking of doing doCorporation (as there is doReligion) in cvCity but I hope there is an easier way.
     
  10. OTiger

    OTiger Warlord

    Joined:
    Aug 26, 2012
    Messages:
    178
    Gender:
    Male
    I'm getting a weird error here. When I put in a leaderhead to my modular folder in my personal mod, you can't play as them, but they show up in in Civilopedia. You can put in a custom civ into the modular folder and it works. (The CIV4CivilizationInfos file has been edited to put in the new leader.) It was working before.

    Do you know what's going on?

    EDIT: Er, never mind. I solved it on my own.
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,970
    Location:
    DE/NL/FR
    Why do you not make it a normal mod? Would maybe make it easier.

    The leader has been assigned to a civ, right?
     
  12. Zlatko

    Zlatko CIW

    Joined:
    Apr 1, 2010
    Messages:
    713
    Location:
    Solar System
    Is it possible to make military pact from defensive pact. Military pact i think on (offensive/defensive pact) If i in military pact with Saladin and Napoleon and I declare war on Alexander, and then are Saladin and Napoleon in war with Alexander. Or Napoleon declare war on Caesar, i am in war with Caesar, and pact canceled as in Civ4Bts, but we are in war (as defensive pact in BTS).
    Whether this can be done in python and we keep CONTACT_DEFENSIVE_PACT tag? Just to rearrange defensive pact, to remain defensive pact but only upgrade in python. Is this possible? Is this one already made?
     
  13. Chiyochan

    Chiyochan King

    Joined:
    Jul 28, 2007
    Messages:
    710
    Location:
    Chiyochan's Country
    Cities dont appear in the vassal states trade options. I want them to. Wat do?
     
  14. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
  15. Chiyochan

    Chiyochan King

    Joined:
    Jul 28, 2007
    Messages:
    710
    Location:
    Chiyochan's Country
  16. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Well, if you are not familiar with editing the dll and compiling it, it might be a bit difficult. Editing the specific file is relatively easy but for re-compiling the dll afterwards, you will need a software, which in itself is easy to use but a bit complex to set up properly.

    If you want to try it, I suggest that you read this excellent tutorial first: http://forums.civfanatics.com/showthread.php?t=405444
     
  17. Chiyochan

    Chiyochan King

    Joined:
    Jul 28, 2007
    Messages:
    710
    Location:
    Chiyochan's Country
    will this allow me to edit a preexisting dll? I'm trying to do this for a preexisting mod.
     
  18. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,970
    Location:
    DE/NL/FR
    You cannot edit .dll files.
    If you have a finished .dll from another mod, then you need to take a look in the mod's files, to see if the source files for the .dll are there.
    If yes, then you have to merge the changes from these files into the normal .cpp and .h files, and compile a new .dll.
     
  19. Chiyochan

    Chiyochan King

    Joined:
    Jul 28, 2007
    Messages:
    710
    Location:
    Chiyochan's Country
    and since it's not, looks like I'll have to pester the developer.
     
  20. Alrik2002

    Alrik2002 Warlord

    Joined:
    May 24, 2012
    Messages:
    214
    Location:
    Berlin, Germany
    In my log "xml" are a lot of lines with the following or almost similar lines (the files are different):

    Code:
    [80405.863] info type NONE not found, Current XML file is: xml\Buildings/CIV4BuildingInfos.xml
    I´ve checked some of them. Most are referring to tags with text but in the LeaderHeadInfos there are some tags of "Miscellaneous".

    Is this something to care about or can I just ignore these lines generally?

    Is there any tutorial which explains how to use the logs, f.e. which logs are important?
     

Share This Page