Advertisement
Civilization Fanatics' Center  

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.

Go Back   Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Oct 08, 2010, 09:01 AM   #1
Hutoth
Chieftain
 
Hutoth's Avatar
 
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?
Hutoth is offline   Reply With Quote
Old Oct 08, 2010, 12:02 PM   #2
Kyoss
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
Kyoss is offline   Reply With Quote
Old Oct 08, 2010, 12:07 PM   #3
Supercheese
Zeppelin Commander
 
Supercheese's Avatar
 
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>
This being within your <GameData> and such.

Cheers.
__________________
Currently playing: Star Trek Online, OpenTTD

Bring back rigid airships, the most awesome aircraft ever built by mankind!
Supercheese is offline   Reply With Quote
Old Oct 08, 2010, 01:31 PM   #4
Kyoss
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
Kyoss is offline   Reply With Quote
Old Oct 08, 2010, 03:42 PM   #5
MilkmanDan
Chieftain
 
MilkmanDan's Avatar
 
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.
MilkmanDan is offline   Reply With Quote
Old Oct 08, 2010, 06:58 PM   #6
Hutoth
Chieftain
 
Hutoth's Avatar
 
Join Date: Oct 2010
Posts: 2
it was a breakthrough

Quote:
Originally Posted by Supercheese View Post
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>
This being within your <GameData> and such.

Cheers.
Thank you so much for that - I went exploring on the database after seeing this, and have got it working and a range of other stuff for my 1st mod now in progress. More of an update soon, but wanted to say Thanks!!! first.
Hutoth is offline   Reply With Quote
Reply

Bookmarks

Tags
civ5, mod, question

Go Back Civilization Fanatics' Forums > CIVILIZATION V > Civ5 - Creation & Customization > How to tie Yields to multiple conditions

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 06:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR