View Full Version : What does domainInfos do
civ editor11 Aug 19, 2009, 01:54 PM I know how to add something to this file. What does this do to make a domain and give it to a unit?
Do I need to mod the dll to make it work?
Do I need to mod python to make it work?
TheLadiesOgre Aug 19, 2009, 02:24 PM You would need to mod the dll is my guess, at least to make it work right
civ editor11 Aug 19, 2009, 02:47 PM Thanks I was just wondering if i could make a few easy changes without the dll.
What parts will i have to change?
TC01 Aug 19, 2009, 06:08 PM Thanks I was just wondering if i could make a few easy changes without the dll.
What parts will i have to change?
What do you want to do? You really should ask that, that way people will be able to point you to what parts specifically need to be modded.
With my limited knowledge of the SDK I know that any added Domain needs to be added to CvEnums.h and CyEnumsInterface.cpp here:
enum DomainTypes // Exposed to Python
{
NO_DOMAIN = -1,
DOMAIN_SEA,
DOMAIN_AIR,
DOMAIN_LAND,
DOMAIN_IMMOBILE,
#ifdef _USRDLL
NUM_DOMAIN_TYPES
#endif
};
and here:
python::enum_<DomainTypes>("DomainTypes")
.value("DOMAIN_SEA", DOMAIN_SEA)
.value("DOMAIN_AIR", DOMAIN_AIR)
.value("DOMAIN_LAND", DOMAIN_LAND)
.value("DOMAIN_IMMOBILE", DOMAIN_IMMOBILE)
.value("NUM_DOMAIN_TYPES", NUM_DOMAIN_TYPES)
;
respectively.
You'd probably have to mod other parts to make your new domain do specific stuff.
If you want to change the kind of things a domain does, you'd have to mod "those other parts".
civ editor11 Aug 19, 2009, 06:26 PM I want to make a new domain orbit and i want to change the terrains the other domains are allowed to go on. this is to simplify my xml work in the star wars mod
The_J Aug 19, 2009, 06:36 PM I don't know, how much Star Wars is different from Final Frontier, but in FF DOMAIN_SEA is not used, so you could maybe "rape" that domain.
civ editor11 Aug 19, 2009, 06:59 PM What do you mean by that?
TC01 Aug 19, 2009, 07:12 PM I want to make a new domain orbit and i want to change the terrains the other domains are allowed to go on. this is to simplify my xml work in the star wars mod
Why do you need to? We're using XML tags in CIV4UnitInfos.xml to prevent units from crossing into orbit or space. Or at least I thought we were. Each unit that should not be allowed to venture into Orbit or Space needs this:
<TerrainImpassables>
<TerrainImpassable>
<TerrainType>TERRAIN_TUNDRA</TerrainType>
<bTerrainImpassable>1</bTerrainImpassable>
</TerrainImpassable>
<TerrainImpassable>
<TerrainType>TERRAIN_ORBIT</TerrainType>
<bTerrainImpassable>1</bTerrainImpassable>
</TerrainImpassable>
</TerrainImpassables>
in it's UnitInfo. It might be easier, but SDK coding is a lot harder then copy-pasting that into every unit info. A note: Tundra is "deep space", orbit is "planetary orbit space".
I might be missing something...
I don't know, how much Star Wars is different from Final Frontier, but in FF DOMAIN_SEA is not used, so you could maybe "rape" that domain.
We're using land for everything. Even space and orbit, which is why I'm not sure as to the point.
We have planets and space that acts like water, but in reality space is land too. This is because of "landlocked planets" (cities are built at the center of a planet. Space units are allowed to cross planet tiles, but land units can't enter space or deep space).
I don't think this would work, though. The idea is that space units must be able to go over land terrain. You'd have to add a new domain.
civ editor11 Aug 19, 2009, 07:58 PM Okay I was just seeing if there was any way to make it easier other than going through all those files
Tholish Aug 26, 2009, 05:11 AM In my FutureMod I make spaceships sea domain with AllTerrain, but I also use a snippet of dll that koma 13 made for the dunewars mod to let landlocked cities make naval units. This allows them to use naval unit ais. Yet there is also the issue that units in space could pass over rival territory, so I also made spaceships able to move in rival terrain, like Caravels.
<bRivalTerritory>1</bRivalTerritory>
...
<bSpy>1</bSpy>
...
<bCanMoveImpassable>1</bCanMoveImpassable>
<bCanMoveAllTerrain>1</bCanMoveAllTerrain>
Still there is no solution for the fact that once you are at war with an enemy your supposedly orbital units have to stop to go around a line of ground units unless they can punch through them--they can't just pass overhead.
If you add a domain you will probably have to change just a huge amount of stuff. One good way to find out is to open the dll as a project using MSVC++2005 as instructed in the tutorials section, then select "edit" then "find" and make sure you are searching in the entire project. You will probably wind up opening half the files in the SDK if you do a search for "domain."
One of the problems with land as planets and sea as space is that you don't have wrap on the planets but instead have a finite map with coasts. Messing with wrap to make it work with a feature or terrain would probably be really hard.
|
|