| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Chieftain
Join Date: Oct 2010
Posts: 2
|
How to tie Yields to multiple conditions
First Post, from a Newbie/ Settler-level Wannabe Modder
I wanted to try to learn the basics of modding, so I made a little plan for something "small" I thought might be interesting, namely: 1. trading posts positioned on a trade route = +1 Gold 2. trading posts not adjacent to any other trading posts or a city = +1 Gold 3. trading posts adjacent to an improved resource = +1 Gold per improved resource. 4. trading posts in general -1 Gold. (let's forget the "why" of the above, which is irrelevant until I get past the "how") I believe I know how to make #4 work (so put that at the end, as it seems the easiest to do using a simple <update> Anyway: I'm evidently doing something totally wrong, and just making up multiple-conditions without defining them or something, but I really have no idea - no background in Dev beyond basic html and hello world ![]() I started out on #1. First, I tried: <GameData> <Improvement_Yields> <Row> <ImprovementType>IMPROVEMENT_TRADING_POST</ImprovementType> <RouteType>ROUTE_ROAD</RouteType> <YieldType>YIELD_GOLD</YieldType> <Yield>1</Yield> </Row> <Row> <ImprovementType>IMPROVEMENT_TRADING_POST</ImprovementType> <RouteType>ROUTE_RAILROAD</RouteType> <YieldType>YIELD_GOLD</YieldType> <Yield>1</Yield> </Row> </Improvement_Yields> </GameData> Then I tried: <GameData> <Improvement_Yields> <Update> <Set Yield="3"/> <Where ImprovementType="IMPROVEMENT_TRADINGPOST" RouteType="ROUTE_ROAD" YieldType="YIELD_GOLD"/> </Update> </Improvement_Yields> </GameData> I assume anyone who knows what they are doing with mods will instantly see what's going wrong here. I... do not. I am thinking that the route "condition" is not properly linked up and I probably have to set up something elsewhere to make this work. So anyway.. Faced with this initial barbarian horde, I decided to come here rather than wade into obviously violent waters like addressing proximity of other improvements in #2 and #3. Advice? |
|
|
|
|
|
#2 |
|
Chieftain
Join Date: Jun 2008
Location: Germany
Posts: 50
|
Road are not an improvement.. thats all i can tell you for now (without going deeper into the code myself, for which i have no time now), sorry
|
|
|
|
|
|
#3 |
|
Zeppelin Commander
Join Date: Aug 2009
Location: Idaho
Posts: 378
|
To make trading posts +1 gold with a road, the code should look like this:
Code:
<Improvement_RouteYieldChanges> <Row> <ImprovementType>IMPROVEMENT_TRADING_POST</ImprovementType> <RouteType>ROUTE_ROAD</RouteType> <YieldType>YIELD_GOLD</YieldType> <Yield>1</Yield> </Row> </Improvement_RouteYieldChanges> Cheers.
__________________
Currently playing: Star Trek Online, OpenTTD Bring back rigid airships, the most awesome aircraft ever built by mankind! |
|
|
|
|
|
#4 |
|
Chieftain
Join Date: Jun 2008
Location: Germany
Posts: 50
|
Lets assume this works:
Wouldnt Trading Post then nullify the cost of roads, wouldnt everybody then just build roads on TradingPosts?
__________________
Civ5 Tutorials: How To add a new Resource |
|
|
|
|
|
#5 |
|
Chieftain
Join Date: Dec 2005
Posts: 54
|
roads don't change the tile yield, they're always in effect. this would only help if the tile gets worked.
|
|
|
|
|
|
#6 | |
|
Chieftain
Join Date: Oct 2010
Posts: 2
|
it was a breakthrough
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| civ5, mod, question |
|
| Thread Tools | |
|
|