Modmodding Q&A Thread

Soooooo I have a fork I want to use for pull requests, but I can't figure out how to keep it up to date with your main branch. Is there a more elegant way than just deleting everything and making a new fork every few weeks when I want to make a new pull request?
 
What would I have to do to add a new scripted city like Samarkand or Jerusalem in addition to just adding a line in Barbs.py? I mean it seems to work by itself, but for some reason it throws a bunch of Python exceptions in 1200AD, coinciding with the spawn of Kazan, and I suspect it might be related to the total number of minor cities.
Did you update the iNumMinorCities constant? Otherwise the content of the Python exceptions would help.

Soooooo I have a fork I want to use for pull requests, but I can't figure out how to keep it up to date with your main branch. Is there a more elegant way than just deleting everything and making a new fork every few weeks when I want to make a new pull request?
Yes, here's a guide.

Most online Git guides assume you are using the command line client, but I'm sure you can figure out to find the right dialog options in Tortoise to do the equivalent. The important points are:
- when you do a pull to update your fork, the client should point to "origin" by default. This is your fork.
- you can add another source that points to the main DoC repo ("upstream" in the guide, but the name doesn't matter)
- then you can replace origin by upstream when doing a pull to get commits from the main repo
 
How does the settling with more than one population work? It appears to depend on both civ and location (and era/tech?).
 
It's the same for all civs. It's their current era, plus one if it's an overseas colony after the discovery of Astronomy. The code is in CvCity::init().
 
Is there any way to make it civ-specific? I could give them a settler UU if necessary.
 
Yeah, both is possible. In fact even the Harappan UU ability is implemented as a civ ability for simplicity.
 
I can't find CvCity::init(), even after doing a file search in NotePad. :blush:
 
Search CvCity.cpp for ::init without parentheses, I usually leave out parameters when referencing methods.
 
There is no file called CvCity.
 
In CvGameCoreDLL.
 
Got it. Thanks!
 
What does the iAsset and iPower do in the tech?
 
iAsset: determines how much this tech counts toward a player's score.
iPower: determines how the AI judges the military value of that tech (to evaluate an enemy's strength)
 
I'm going crazy trying to find the art for your smokehouse. It isn't in the FPK files, and searching the entire assets folder didn't turn up one instance of the word.
 
You know you can easily find the art location with the XML, right?

Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_SMOKEHOUSE</Type>
			<LSystem>LSYSTEM_1x1</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>1.2</fScale>
			<fInterfaceScale>0.6</fInterfaceScale>
			[U]<NIF>Art/Structures/Buildings/Smokehouse/Smokehouse (Medieval).nif</NIF>[/U]
			<KFM/>
			<Button>Art/Structures/Buildings/Smokehouse/Button_Smokehouse.dds</Button>
		</BuildingArtInfo>

If it is in the FPK, it still follows that path.
 
You know you can easily find the art location with the XML, right?

Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_SMOKEHOUSE</Type>
			<LSystem>LSYSTEM_1x1</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>1.2</fScale>
			<fInterfaceScale>0.6</fInterfaceScale>
			[U]<NIF>Art/Structures/Buildings/Smokehouse/Smokehouse (Medieval).nif</NIF>[/U]
			<KFM/>
			<Button>Art/Structures/Buildings/Smokehouse/Button_Smokehouse.dds</Button>
		</BuildingArtInfo>

If it is in the FPK, it still follows that path.

Yes. It isn't in there. Which is what I just said.

Since file searches aren't always reliable, I went into both ArtDefines and BuildingInfos to search them individually. There's nothing in them called smokehouse.
 
How did you search the FPK?
 
Back
Top Bottom