• Civilization 7 has been announced. For more info please check the forum here .

Quick Modding Questions Thread

Thats the weird thing. No error messages and nothing in the python error log. The only thing I noted is that it won't show up when I certain amount of files in the art file. Even if I just copy the same file several times. It's odd.
 
Are you sure that you're not confusing the game with the path of the button (Art/Interface/Buttons/Actions/resettle.dds)?

Also, double check your ini file to see if you have Python exceptions enabled (also Enable the logging system). Sometimes this file gets re-initialized to the default which is no.

Without your files, it is difficult to say something more.
 
I've been modding the Fury Road mod for a bit now. Adding/replacing a whole mess of units. Everything seems to be going fine. However the resettle button(presumably a python button), for the refugees/caravans, is no longer showing up at all. At first I thought it was because I edited python, so I reverted that. The problem was still present. Eventually after taking apart the changes I made one painful piece at a time I found that it from having too many new art assets. Even if the file in Assets/Art weren't being used for anything their existence was somehow stopping the resettle button from showing up.

Long story short: Having too many art files lead to python buttons not showing up. Does anyone know of any way to fix this?

This sounds similar to a problem I encountered with the Babylon 5 Mod. The issue was resolved on This thread. Post 297 showed the issue and 298 clarified what the problem was and how to fix it. Hope this is of some use and apologies if it is not related to this at all.
 
How do I get random start locations to work in a scenario?

I have created a Large Earth Map for Caveman2Cosmos with all its new resources and 21 preset civs and leaders. No problem.

I now want to create a second map with random civs and leaders and random start locations.

For each civ I have the following entry.

BeginPlayer
Team=0
LeaderType=NONE
CivType=NONE
Color=NONE
ArtStyle=NONE
Handicap=HANDICAP_NOBLE
RandomStartLocation=true
EndPlayer

When I load the scenario, I do get random civs and leaders but not random locations. (Except for the first attempt)

I have tried over a dozen game starts on the map.

If I use "Custom Scenario" which lets me make game play selections, the start position of my civ and the 8 default AI civs are always the same.

If I use "Play Scenario" (no game choices) a couple of civs may be in different start locations.

Is this a known problem or am I doing something wrong?
 
could it be that there are a limited number of 'ideal' start locations, so those are the only place it thinks the AI can fit them in?

It is a large map and some large Islands are ignored. So I doubt that is the case. :)

Reading through some old threads, I think an entry in the Plot map area may be the clue.

StartingPlot in various map locations.

But I am not sure until I test it, if it works when no civs are selected - that is all civs etc. are random.

Clues anyone. :confused:

Just to remind everyone. I want Random Civs, Random Leaders and Random Start Positions on a pre-made map. :)
 
I never play with random civs on a map but I think that RandomStartLocation=true only works when you have assigned StartingPlot(s) on the map. You can have more starting plots than Civs.
 
This sounds similar to a problem I encountered with the Babylon 5 Mod. The issue was resolved on This thread. Post 297 showed the issue and 298 clarified what the problem was and how to fix it. Hope this is of some use and apologies if it is not related to this at all.

Well that explains the "too much" thing. It also gave me a better idea of where to look for the code controlling the buttons visibility.

I presume this is where the problem lies. All of the additional unit buttons added by fury road: resettle, refuel, unconvert appear to use WIDGET_GENERAL. The post you linked seemed to imply that adding additional "action buttons": promotions, unit upgrades, and a few others. Would in some way change the existing buttons orientation.

I'm not sure though.
Spoiler :
Code:
					# DaveA ACTION: inspired by Gods Of Old
					pUnit = g_pSelectedUnit
					iUnitType = pUnit.getUnitType()
					pUnitOwner = gc.getPlayer(pUnit.getOwner())
					if pUnitOwner.isTurnActive():
						# Refugee and truck resettle
						n = CvEventInterface.getEventManager().resettleID(iUnitType)
						if n > 0:
							art = ArtFileMgr.getInterfaceArtInfo("INTERFACE_FURY_RESETTLE").getPath()
							screen.appendMultiListButton("BottomButtonContainer", art, 0, WidgetTypes.WIDGET_GENERAL, n, n, False)
							# Maybe disable
							bDisable = true
							pPlot = gc.getMap().plot(g_pSelectedUnit.getX(), g_pSelectedUnit.getY())
							if pPlot.isCity():
								iOwner = pPlot.getPlotCity().getOwner()
								if iOwner == pUnitOwner.getID():
									bDisable = false
							if bDisable:
								screen.disableMultiListButton("BottomButtonContainer", 0, iCount, art)							
							screen.show("BottomButtonContainer")
							iCount = iCount + 1

Here are a few other bits of python that directly involved settle button. Maybe they are involved.

Spoiler :
IDs the unit
Code:
   # Map from unit type to widget action, called by CvMainInterface.  665 is
   # for settlers, 667 is for trucks.
   def resettleID(self, iType):
      if not self.settleTypes.has_key(iType): return 0
      if self.settleTypes[iType] == 0: return 665
      return 667

controls mouse over information?
Code:
   # Help strings for action buttons
   def getWidgetHelp(self,argsList):
      eWidgetType, iData1, iData2, bOption = argsList
      trans = CyTranslator()
      #if (eWidgetType == WidgetTypes.WIDGET_ACTION):	  
      if iData1 == 665:
         return trans.getText("TXT_KEY_FURY_RESETTLE_MOUSE_OVER", ())
      if iData1 == 666:
         return trans.getText("TXT_KEY_FURY_REFUEL_MOUSE_OVER", ())
      if iData1 == 667:
         return trans.getText("TXT_KEY_FURY_UNLOAD_MOUSE_OVER", ())
      if iData1 == 668:
          return trans.getText("TXT_KEY_FURY_UNCONVERT_MOUSE_OVER", ())
      return u""

I'm still not entirely sure of how to fix this issue. Would having the units be IDed by something other than Data1 fix the issue?
 
Without a screenshot or something, not sure what your problem is.
1) The resettle button does not show up at all
2) All action buttons do not show up
3) The resettle button shows up, without hover text

Anyway, to know whether it is a python or art problem, the first thing i will do is change
Code:
art = ArtFileMgr.getInterfaceArtInfo("INTERFACE_FURY_RESETTLE").getPath()
to point to some default artpath in BTS.

Example:
Code:
art = gc.getUnitInfo(0).getButton()
 
Right sorry about that.

This is what the button looks like when it works, before I add my art assets.

Spoiler :




This is what happens when I add my art assets.

Spoiler :




So it does not show up when it is supposed to.


I swapped out the art's value.

Changing:
art = ArtFileMgr.getInterfaceArtInfo("INTERFACE_FURY_RESETTLE").getPath()
to:
art = gc.getUnitInfo(0).getButton()

But the issue is still present
 
What do you do on top of adding your art assets? Just add a folder of art stuff that is not linked by XML values or also add new XML values?
 
having an issue with a custom unit it wont promote
Spoiler :
<UnitInfo>
<Class>UNITCLASS_WARRIOR</Class>
<Type>UNIT_CHOSEN_CHOSEN</Type>
<UniqueNames/>
<Special>NONE</Special>
<Capture>NONE</Capture>
<Combat>UNITCOMBAT_MELEE</Combat>
<Domain>DOMAIN_LAND</Domain>
<DefaultUnitAI>UNITAI_ATTACK</DefaultUnitAI>
<Invisible>NONE</Invisible>
<SeeInvisible>NONE</SeeInvisible>
<Description>TXT_KEY_UNIT_CHOSEN</Description>
<Civilopedia>TXT_KEY_UNIT_CHOSEN_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_CHOSEN_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<bAnimal>0</bAnimal>
<bFood>0</bFood>
<bNoBadGoodies>1</bNoBadGoodies>
<bOnlyDefensive>0</bOnlyDefensive>
<bNoCapture>0</bNoCapture>
<bQuickCombat>0</bQuickCombat>
<bRivalTerritory>1</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>0</bMilitaryProduction>
<bPillage>1</bPillage>
<bSpy>0</bSpy>
<bSabotage>1</bSabotage>
<bDestroy>1</bDestroy>
<bStealPlans>1</bStealPlans>
<bInvestigate>1</bInvestigate>
<bCounterSpy>1</bCounterSpy>
<bFound>1</bFound>
<bGoldenAge>1</bGoldenAge>
<bInvisible>1</bInvisible>
<bFirstStrikeImmune>1</bFirstStrikeImmune>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<bIgnoreBuildingDefense>1</bIgnoreBuildingDefense>
<bCanMoveImpassable>1</bCanMoveImpassable>
<bCanMoveAllTerrain>1</bCanMoveAllTerrain>
<bFlatMovementCost>0</bFlatMovementCost>
<bIgnoreTerrainCost>1</bIgnoreTerrainCost>
<bNukeImmune>1</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>0</bMechanized>
<bSuicide>0</bSuicide>
<bHiddenNationality>0</bHiddenNationality>
<bAlwaysHostile>0</bAlwaysHostile>
<UnitClassUpgrades/>
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>
<FlankingStrikes/>
<UnitAIs/>
<NotUnitAIs/>
<Builds/>
<ReligionSpreads/>
<CorporationSpreads/>
<GreatPeoples>
<GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_SPY</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople> <GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_GENERAL</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
<GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_ENGINEER</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
<GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_MERCHANT</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
<GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_SCIENTIST</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
<GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_ARTIST</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
<GreatPeople>
<GreatPeopleType>SPECIALIST_GREAT_PRIEST</GreatPeopleType>
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
</GreatPeoples>
<Buildings/>
<ForceBuildings/>
<HolyCity>NONE</HolyCity>
<ReligionType>NONE</ReligionType>
<StateReligion>NONE</StateReligion>
<PrereqReligion>NONE</PrereqReligion>
<PrereqCorporation>NONE</PrereqCorporation>
<PrereqBuilding>NONE</PrereqBuilding>
<PrereqTech>NONE</PrereqTech>
<TechTypes/>
<BonusType>NONE</BonusType>
<PrereqBonuses/>
<ProductionTraits/>
<Flavors/>
<iAIWeight>0</iAIWeight>
<iCost>0</iCost>
<iHurryCostModifier>0</iHurryCostModifier>
<iAdvancedStartCost>100</iAdvancedStartCost>
<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
<iMinAreaSize>-1</iMinAreaSize>
<iMoves>10</iMoves>
<bNoRevealMap>0</bNoRevealMap>
<iAirRange>0</iAirRange>
<iAirUnitCap>0</iAirUnitCap>
<iDropRange>0</iDropRange>
<iNukeRange>-1</iNukeRange>
<iWorkRate>0</iWorkRate>
<iBaseDiscover>0</iBaseDiscover>
<iDiscoverMultiplier>0</iDiscoverMultiplier>
<iBaseHurry>0</iBaseHurry>
<iHurryMultiplier>0</iHurryMultiplier>
<iBaseTrade>0</iBaseTrade>
<iTradeMultiplier>0</iTradeMultiplier>
<iGreatWorkCulture>0</iGreatWorkCulture>
<iEspionagePoints>0</iEspionagePoints>
<TerrainImpassables/>
<FeatureImpassables/>
<TerrainPassableTechs/>
<FeaturePassableTechs/>
<iCombat>100</iCombat>
<iCombatLimit>100</iCombatLimit>
<iAirCombat>0</iAirCombat>
<iAirCombatLimit>0</iAirCombatLimit>
<iXPValueAttack>100</iXPValueAttack>
<iXPValueDefense>100</iXPValueDefense>
<iFirstStrikes>1</iFirstStrikes>
<iChanceFirstStrikes>5</iChanceFirstStrikes>
<iInterceptionProbability>100</iInterceptionProbability>
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>100</iWithdrawalProb>
<iCollateralDamage>100</iCollateralDamage>
<iCollateralDamageLimit>100</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>10</iCollateralDamageMaxUnits>
<iCityAttack>100</iCityAttack>
<iCityDefense>100</iCityDefense>
<iAnimalCombat>100</iAnimalCombat>
<iHillsAttack>100</iHillsAttack>
<iHillsDefense>100</iHillsDefense>
<TerrainNatives/>
<FeatureNatives/>
<TerrainAttacks/>
<TerrainDefenses/>
<FeatureAttacks/>
<FeatureDefenses/>
<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>
<UnitCombatCollateralImmunes/>
<DomainMods/>
<BonusProductionModifiers/>
<iBombRate>0</iBombRate>
<iBombardRate>100</iBombardRate>
<SpecialCargo>NONE</SpecialCargo>
<DomainCargo>NONE</DomainCargo>
<iCargo>0</iCargo>
<iConscription>0</iConscription>
<iCultureGarrison>100</iCultureGarrison>
<iExtraCost>0</iExtraCost>
<iAsset>4</iAsset>
<iPower>0</iPower>
<UnitMeshGroups>
<iGroupSize>4</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>4</iMeleeWaveSize>
<iRangedWaveSize>0</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_SETTLER_MALE</EarlyArtDefineTag>
</UnitMeshGroup>
<UnitMeshGroup>
<iRequired>1</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_SETTLER_FEMALE</EarlyArtDefineTag>
</UnitMeshGroup>
<UnitMeshGroup>
<iRequired>2</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_SETTLER_CHILD</EarlyArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<FormationType>FORMATION_TYPE_DEFAULT</FormationType>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<FreePromotions/>
<LeaderPromotion>NONE</LeaderPromotion>
<iLeaderExperience>0</iLeaderExperience>
</UnitInfo>
 
It might have something to do with the spy skills or Great Person parts, as 'normally' none of these gain experience.
(Generals only do when they join a unit I think and there are mods that make spies gain xp, but I don't think it happens without those mods). So it might be 'classofying' then some how in the code as not to gain XP. I am not certain if that is the case though..

Does the unit gain XP and just not give you any promotions when it ups a level (and gets the waiting for promo blue glow) or does it not gain XP at all?

@Clanky ("INTERFACE_FURY_RES ETTLE").getPath()

was the space in resettle a typo? that would probably break it if not.
 
hmmm... proper weird...

You could try removing those bits (spy and GP) see if it goes back to working.

Or Alternately make a new one and only put in 1 thing at a time of those parts and see if it keeps working/breaks at any point..

I am not saying any of that would make a difference, I honestly have no idea, but I have never seen those parts used on a combat unit before. (except with spies in the super spy mod I think it is.. There are a few)
 
it has to do with the last section
<iEvasionProbability>0</iEvasionProbability>
<iWithdrawalProb>0</iWithdrawalProb>
<iCollateralDamage>0</iCollateralDamage>
<iCollateralDamageLimit>0</iCollateralDamageLimit>
<iCollateralDamageMaxUnits>0</iCollateralDamageMaxUnits>
<iCityAttack>0</iCityAttack>
<iCityDefense>0</iCityDefense>
<iAnimalCombat>0</iAnimalCombat>
<iHillsAttack>0</iHillsAttack>
<iHillsDefense>0</iHillsDefense>
one of these
 
Top Bottom