Modmodding Q&A Thread

I had a question... Could it be possible to have the Civ Flag (The flag thing that shows at the side of each unit?) dynamically according to certain conditions that have to be given as to the change to happen?

As, for example, having the English flag change to the Union Flag once you have 4 cities minimum on the British Isles, running both Parliament and Monarchy and at very least 2 colonies over 3 continents? Or the Russian one changing into the USSR flag as soon as you begin running Communism?

I think that was done in VD, but I am not entirely sure.
 
Yeah, it's possible, but I would have to do some research on how it's done (changing all flags globally is easier and done in SoI for example).

You're probably better off looking it up in a mod that has already implemented it.
 
In RFCA, there is something like that. If a civ becomes the Mandate of Heaven, their flag changes. I can search for the code if you want.

EDIT:
Found it.
Search in the python file for "flag".
I included 2 art files of the flagdecals, so you can see how the vanilla flag is called and how it is called after the change.
(So you have an example)
 
I'm trying to make my religion screen wider. I changed self.W_SCREEN = 1024 to a higher number, which makes the screen wider but it is no longer centered. I have tried changing many other values but nothing has worked.
 
All I know about interface stuff is trial and error with the predefined variables as well.
 
Is DLL compilation supposed to take 5+ (and still counting) hours?

EDIT: 13+ hours now.
 
That's very weird. Are you using the makefile from the guide I've linked to?
 
That's very weird. Are you using the makefile from the guide I've linked to?

I edited but didn't save it, so I think that's why. I was also using a different program called Dev-C++ (from bloodshed.com). However, after giving up, I installed Microsoft C++ 2008, but when I opened your DLL, it said that you had edited it with a later version and it couldn't be opened. Now, I'm downloading Microsoft Visual Studio 2010. Hopefully, that will work...
 
Some questions:

1) How do you add a new tile to the game?
Spoiler :
I’m thinking about a tile type that maybe useful for DoC, but would like to try it first hefore proposing it so it doesn’t looks dumb. No, it’s not semidesert lol

2. How do you set Unit X to be able to pass the jungle, or how you set unit Y yo be unable to pass a jungle? Moreover, can you set a naval unit to pass through grassland, vice versa land unit to walk on coast?
3. Which one is easier: adding new tile (like Marsh) or new type of jungles/forest?
 
Some questions:

1) How do you add a new tile to the game?
Spoiler :
I’m thinking about a tile type that maybe useful for DoC, but would like to try it first hefore proposing it so it doesn’t looks dumb. No, it’s not semidesert lol

2. How do you set Unit X to be able to pass the jungle, or how you set unit Y yo be unable to pass a jungle? Moreover, can you set a naval unit to pass through grassland, vice versa land unit to walk on coast?
3. Which one is easier: adding new tile (like Marsh) or new type of jungles/forest?

1. I have never done it myself, but I think it's somewhat similar like adding a new feature.

2. </FeatureImpassables> in UnitInfos.xml. It's unit dependent, not unitclass dependent.
To make an unit able to cross both land and water set <bCanMoveAllTerrain>0</bCanMoveAllTerrain> to 1.

3. I haven't added a new tile type, so I can't really compare, but I have added a new type of forest in RFCE.
You only have to edit a new featurevariety in the ArtDefines_Feature.xml.
Take a look here to see what I changed for RFCE.
http://sourceforge.net/p/rfceurope/...eature.xml?diff=519c8dde5fcbc90828f8b020:1059
You also have to add the art files and change the map ofcourse.
 
1. With new tile, you mean a new terrain type, like grass or plains? You should be able to just add it in the TerrainInfos file.

2. I'm not sure right now, but bCanMoveAllTerrain only allows you to enter impassable tiles like peaks (Gunships use it I think). You're still restricted to either land or water by your domain type (DOMAIN_LAND and DOMAIN_WATER respectively). There isn't really a type of unit that's supposed to move across both land and water.

3. Well, marsh actually consists of both a terrain and a feature type, plus a resource on top of it. But in general it doesn't really matter that much. You should make the choice depending on what you want to add and whether it makes more sense as a terrain type where you can put existing features on top of it or whether it makes more sense as a feature type which you can put on top of existing terrain types.
 
2. I'm not sure right now, but bCanMoveAllTerrain only allows you to enter impassable tiles like peaks (Gunships use it I think). You're still restricted to either land or water by your domain type (DOMAIN_LAND and DOMAIN_WATER respectively). There isn't really a type of unit that's supposed to move across both land and water.

IIRC, bCanMoveImpassible allows units to pass peaks. It's also used by subs to go under ice.
bCanMoveAllTerrain should allow the unit to enter all terrain.

EDIT:
I did a little test. bCanMoveAllTerrain allows the unit to enter both water and land tiles, but no impassible tiles. bCanMoveImapassible only allows the unit to enter peaks or ice. (The ice must be on land tiles. It doesn't work if the ice is on a water tile)
 
Interesting, seems like I forgot about bCanMoveAllTerrain and thought it was bCanMoveImpassable.
 
After compiling, here are the errors:

I fixed the simple typos and programming errors, but these are far beyond my understanding of C++ (which is much more rusty, as I haven't had to use C++ for over 6 months).

Code:
Warning	1	The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'TargetPath' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRules, CodeAnalysisForceOutput, CodeAnalysisGenerateS....	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	22
Warning	2	The element 'ItemGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'NMakeNativeOutput' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Item, Reference, COMReference, COMFileReference, Xdcmake, Bscmake, ClCompile, ClInclude, Midl, ResourceCompile, PreLinkEvent, CustomBuildStep, Manifest, ProjectConfiguration, NativeReference, ProjectReference, Compile, EmbeddedResource, Content, Page, Resource, ApplicationDefinition, None, BaseApplicationManifest, Folder, Import, Service, WebReferences, WebReferenceUrl, FileAssociation, BootstrapperFile, PublishFile, CodeAnalysisDependentAssemblyPaths, CodeAnalysisDictionary, CodeAnalysisImport, Link, ResourceCompile, PreBuildEvent, PostBuildEvent' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	67
Warning	3	The element 'ItemGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'NMakeNativeOutput' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Item, Reference, COMReference, COMFileReference, Xdcmake, Bscmake, ClCompile, ClInclude, Midl, ResourceCompile, PreLinkEvent, CustomBuildStep, Manifest, ProjectConfiguration, NativeReference, ProjectReference, Compile, EmbeddedResource, Content, Page, Resource, ApplicationDefinition, None, BaseApplicationManifest, Folder, Import, Service, WebReferences, WebReferenceUrl, FileAssociation, BootstrapperFile, PublishFile, CodeAnalysisDependentAssemblyPaths, CodeAnalysisDictionary, CodeAnalysisImport, Link, ResourceCompile, PreBuildEvent, PostBuildEvent' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	70
Warning	4	The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'NMakeManagedOutput' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRules, CodeAnalysisForceOutput, CodeAnalysisGenerateS....	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	81
Warning	5	The element 'ItemGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'PropertyPageSchema' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Item, Reference, COMReference, COMFileReference, Xdcmake, Bscmake, ClCompile, ClInclude, Midl, ResourceCompile, PreLinkEvent, CustomBuildStep, Manifest, ProjectConfiguration, NativeReference, ProjectReference, Compile, EmbeddedResource, Content, Page, Resource, ApplicationDefinition, None, BaseApplicationManifest, Folder, Import, Service, WebReferences, WebReferenceUrl, FileAssociation, BootstrapperFile, PublishFile, CodeAnalysisDependentAssemblyPaths, CodeAnalysisDictionary, CodeAnalysisImport, Link, ResourceCompile, PreBuildEvent, PostBuildEvent' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	90
Message	6	Could not find schema information for the attribute 'Condition'.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	60
Warning	7	warning C4390: ';' : empty controlled statement found; is this the intent?	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\CvCity.cpp	443
Warning	8	warning C4390: ';' : empty controlled statement found; is this the intent?	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\CvCity.cpp	451
Warning	9	warning C4715: 'getTurns' : not all control paths return a value	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoreutils.cpp	2285
Warning	10	warning C4390: ';' : empty controlled statement found; is this the intent?	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\CvInfos.cpp	10625
Error	11	error C1067: compiler limit : debug information module size exceeded	C:\Microsoft Visual C++ Toolkit 2003\include\memory	498
Warning	12	warning U4010: 'Debug\CyCityInterface1.obj' : build failed; /K specified, continuing ...	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\NMAKE
Error	13	error C1067: compiler limit : debug information module size exceeded	C:\Microsoft Visual C++ Toolkit 2003\include\memory	498
Warning	14	warning U4010: 'Debug\CyPlayerInterface1.obj' : build failed; /K specified, continuing ...	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\NMAKE
Error	15	error C1010: unexpected end of file while looking for precompiled header directive	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\dllmain.cpp	39
Warning	16	warning U4010: 'Debug\dllmain.obj' : build failed; /K specified, continuing ...	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\NMAKE
Warning	17	warning U4011: 'Debug\CvGameCoreDLL.dll' : not all dependents available; target not built	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\NMAKE
Warning	18	warning U4011: 'Debug' : not all dependents available; target not built	C:\Users\Philip\Documents\Visual Studio 2010\Projects\CvGameCoreDLL\NMAKE
Error	19	error MSB3073: The command "nmake /NOLOGO /K Debug" exited with code 1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets	38
	20	IntelliSense: cannot open source file "boost/python/list.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	160
	21	IntelliSense: cannot open source file "boost/python/tuple.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	161
	22	IntelliSense: cannot open source file "boost/python/tuple.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cycity.h	11
	23	IntelliSense: name followed by '::' must be a class or namespace name	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cycity.h	12
	24	IntelliSense: name followed by '::' must be a class or namespace name	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cycity.h	536
	25	IntelliSense: name followed by '::' must be a class or namespace name	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cycity.h	537
	26	IntelliSense: cannot open source file "boost/python/class.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	162
	27	IntelliSense: cannot open source file "boost/python/manage_new_object.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	163
	28	IntelliSense: cannot open source file "boost/python/return_value_policy.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	164
	29	IntelliSense: cannot open source file "boost/python/object.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	165
	30	IntelliSense: cannot open source file "boost/python/def.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	166
	31	IntelliSense: name followed by '::' must be a class or namespace name	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvgamecoredll.h	168
	32	IntelliSense: cannot open source file "boost/python/object.hpp"	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvdllpythonifacebase.h	13
	33	IntelliSense: name followed by '::' must be a class or namespace name	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvdllpythonifacebase.h	14
	34	IntelliSense: identifier "PyObject" is undefined	c:\users\philip\documents\visual studio 2010\projects\cvgamecoredll\cvdllpythonifacebase.h	32
 
Have you used debug as a target? Or release?
 
Maybe I should do that too from time to time ...

It should compile with release as target.
 
Maybe I should do that too from time to time ...

It should compile with release as target.

So if I compile it as release settings, I won't get all of those errors?
 
Top Bottom