More than one person per tile?

Commander Cody

Chieftain
Joined
Nov 27, 2008
Messages
28
How would I go about making it so that more than one person can work a tile? I am asking because I think it would be a great way to make say indenture servants a useful concept as per say I could have 2 or 3 of them working one tile in a city.
 
Thanks for the response Kailric.

Would you know how to make a building output raw goods instead of finished goods per the person working on it? I have figured out how to use the "native unit" and have copied it and changed the name to make it into a native slave unit and my thought was to have a plantation building where the native slaves would be applied to, and it would output small amounts of cotton, tobacco, and sugar.
 
That would be handled in CIV4ProfessionInfos.xml. In the below code you see the <YieldsProduced>. You will also have to create a new Building and Special Building type as well, like so...

CIV4BuildingInfos->BUILDING_PLANTATION
CIV4BuildingClassInfos->BUILDINGCLASS_PLANTATION
CIV4SpecialBuildingInfos->SPECIALBUILDING_PLANTATION

Then in Professions add your new Slave profession...
Code:
<ProfessionInfo>
  <Type>PROFESSION_SLAVE</Type>
  <Description>Put Description here</Description>
  <Civilopedia>Pedia entry here</Civilopedia>
  <Strategy>Strat here</Strategy>
  <Help/>
  <Combat>NONE</Combat>
  <DefaultUnitAI>NONE</DefaultUnitAI>
  <SpecialBuilding>SPECIALBUILDING_PLANTATION</SpecialBuilding>
  <bWorkPlot>0</bWorkPlot>
  <bCitizen>1</bCitizen>
  <bWater>0</bWater>
  <bScout>0</bScout>
  <bCityDefender>0</bCityDefender>
  <bCanFound>0</bCanFound>
  <bUnarmed>0</bUnarmed>
  <bNoDefensiveBonus>0</bNoDefensiveBonus>
  <iCombatChange>0</iCombatChange>
  <iMovesChange>0</iMovesChange>
  <iWorkRate>0</iWorkRate>
  <iMissionaryRate>0</iMissionaryRate>
  <iPower>0</iPower>
  <iAsset>0</iAsset>
  <YieldEquipedNums/>
  <FreePromotions/>
  [COLOR="Red"]<YieldsProduced>
    <YieldType>YIELD_BARLEY</YieldType>
  </YieldsProduced>[/COLOR]
  <Button>Button info here</Button>
  <ProfessionSubTypes/>
</ProfessionInfo>

There plenty of tutorials on this sight. You will also need to edit Python in order to make a place for your Building. Here is the list of Colonization tutrials.. http://forums.civfanatics.com/showpost.php?p=8341500&postcount=1. Note the one on adding new buildings.

Since Colonization is a mod of Civilization 4 you can often use tutorials from it for Colonization as well. Hopes this helps :goodjob:
 
How do you make a building produce more than 1 Yield?

I do not see this line:

<YieldsProduced>
<YieldType>YIELD_BARLEY</YieldType>
</YieldsProduced>

All I have at my disposal are these tags:
<ProfessionInfo>
<Type>PROFESSION_SLAVE</Type>
<Description>TXT_KEY_PROFESSION_SLAVE</Description>
<Civilopedia>TXT_KEY_UNIT_SLAVE_PEDIA</Civilopedia>
<Strategy>TXT_KEY_PROFESSION_FARMER_STRATEGY</Strategy>
<Help/>
<Combat>NONE</Combat>
<DefaultUnitAI>NONE</DefaultUnitAI>
<YieldProduced>YIELD_SUGAR</YieldProduced>
<YieldConsumed>NONE</YieldConsumed>
<SpecialBuilding>SPECIALBUILDING_PLANTATION</SpecialBuilding>
<bWorkPlot>0</bWorkPlot>
<bCitizen>1</bCitizen>
<bWater>0</bWater>
<bScout>0</bScout>
<bCityDefender>0</bCityDefender>
<bCanFound>0</bCanFound>
<bUnarmed>0</bUnarmed>
<bNoDefensiveBonus>0</bNoDefensiveBonus>
<iCombatChange>0</iCombatChange>
<iMovesChange>0</iMovesChange>
<iWorkRate>0</iWorkRate>
<iMissionaryRate>0</iMissionaryRate>
<iPower>0</iPower>
<iAsset>0</iAsset>
<YieldEquipedNums/>
<FreePromotions/>
<Button>,Art/Interface/Buttons/Civilizations/Colonization_Civilizations_Leaders.dds,3,8</Button>
</ProfessionInfo>

Perhaps I am missing something?

Otherwise I got everything else to work perfectly. Your advice and tutorial references were excellent.
 
Just out of my head (without having checked with the xml-files) there should be a "modificator" tag in either the building or the profession xml-file which allows you to enhance (or reduce) the output of the respective profession (percentage-based, so something like "100" would mean doubling the output).
Actually, I guess it will be located in the building, as the higher level buildings typically give you an enhanced output, too. Just have a look there.
 
I did a manual search going through all the mod pages looking for Multiple Yields produced or something along those lines. Found Multiple Yields Consumed, but the link to that one was dead.
 
I did a manual search going through all the mod pages looking for Multiple Yields produced or something along those lines. Found Multiple Yields Consumed, but the link to that one was dead.

Multiple Professions Per Building (by Androrc) and Multiple Yields Consumed / Produced (by Aymerick)
were both integrated (and significantly improved over the years) in Religion and Revolution.

So you could take a look in our sources (that are provided with our download).
It will require programming skills (C++ and Python) though to adapt them to another mod.
 
@raystuttgart

Thanks for the suggestion. I have looked at Religion and Revolution. The problem is that reverse engineering it is beyond my abilities. I tried to borrow just the Africa screen and area I could not get that too work, and I even tried just doing it from the Triangle Trade Mod which mainly just centers on that.

Honestly it would be nice if certain components were posted by themselves. Let people pick and choose which stuff that they like and want.
 
The problem is that reverse engineering it is beyond my abilities.

Well, even the most experienced and skilled modders started like that.
All it takes is enough motivation and time.

I tried to borrow just the Africa screen and area I could not get that too work, and I even tried just doing it from the Triangle Trade Mod which mainly just centers on that.

Adapting such features to your mod will require some programming skills of course.
But a beginner in programming (with basic programming skills) should still be able to adapt "Africa" to his mod in about one or two weekends.

If you have specific questions about some code, simply post them in the forums.
There are still people around that could (and most likely will) answer.

Honestly it would be nice if certain components were posted by themselves.

There are technical limitations to that.
(The game can have only 1 single core logic DLL for example.)

For some features (basic) ModComps exist.

If you know programming and commenting is good, it does not make such a big difference if the code you use is inside another (big) mod or inside a (small) ModComp.

In fact the big mods are usually the better place to look at, because their implementations have become far more advanced and stable than the (old) original ModComps.
(ModComps are often missing functionality and usually still contain a lot of issues.)

----

Good luck with your modding. :thumbsup:
 
Actually you do not need a mod for 2 professions per unit. I found a very easy work around utilizing the existing XML in the game. Here is my fix:

<ProfessionMeshGroups>
<UnitMeshGroups>
<ProfessionType>PROFESSION_SLAVE_COTTON</ProfessionType>
<fMaxSpeed>1.25</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<ArtDefineTag>ART_DEF_UNIT_BRAVE</ArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<UnitMeshGroups>
<ProfessionType>PROFESSION_SLAVE</ProfessionType>
<fMaxSpeed>1.25</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<ArtDefineTag>ART_DEF_UNIT_BRAVE</ArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
</ProfessionMeshGroups>

Did not need any fancy python coding or DLL fixing. A very simple fix. Lets one unit be a professional at two different buildings.
 
Spoiler :

Actually you do not need a mod for 2 professions per unit. I found a very easy work around utilizing the existing XML in the game. Here is my fix:

<ProfessionMeshGroups>
<UnitMeshGroups>
<ProfessionType>PROFESSION_SLAVE_COTTON</ProfessionType>
<fMaxSpeed>1.25</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<ArtDefineTag>ART_DEF_UNIT_BRAVE</ArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
<UnitMeshGroups>
<ProfessionType>PROFESSION_SLAVE</ProfessionType>
<fMaxSpeed>1.25</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>1</iMeleeWaveSize>
<iRangedWaveSize>1</iRangedWaveSize>
<UnitMeshGroup>
<iRequired>1</iRequired>
<ArtDefineTag>ART_DEF_UNIT_BRAVE</ArtDefineTag>
</UnitMeshGroup>
</UnitMeshGroups>
</ProfessionMeshGroups>

Did not need any fancy python coding or DLL fixing. A very simple fix. Lets one unit be a professional at two different buildings.


You are confusing things a bit.

1. <ProfessionMeshGroups> is graphical configuration and nothing else. There is no real feature functionality related to it.
(It only says, which graphics the unit should display for a specific profession.)

2. There is no limitation (in Vanilla and most mods) that disallows a (Setter-like-)Unit to work in different Professions (in different Buildings).
But if you want to have several Professions working in one and the same Building, you will need to touch DLL and Python.

----------

It is important to understand:

XML is not logic but only simple configuration (for existing logic).
The logic is inside of the DLL and the Python coding.

If functionality is already implemented in the logic and configuration elements in XML are already available, you can use it of course.
But completely new functionality will always require coding.

----------

Good luck with your modding. :thumbsup:
 
Multiple units working the same tile. That only makes sense. If you can stuff 2 or 3 units into a building to increase building output, it only makes sense that you could stuff 2 or 3 units onto a tile to increase tile output. Additional units assigned to buildings requires building upgrades (ex: small building 1 unit to giant building 3+ units, etc.), it could be that upgrades to the tile increase how many workers can work the tile (ex: small farm 1 unit to giant farm 3 units, etc.). Very cool idea. Maybe I can add it to radical concepts? Is that ok Commander Cody?
 
Top Bottom