Sid Meier's Civilization V

Sid Meier's Civilization V

Trading Posts Grow into Towns
Tradepost Evolution
First off, love the mod and can tell you put a bit of effort into it.

I would like to collaborate with you on making a mod of your mod. I have been creating XML mods for a time now, but have not really touched lua mods yet. I think your mod is just the right amount of difficulty to challenge myself but not be over my head. Here's what I would like to do, let me know if you would like to help.

1. To facilitate the organic/realistic nature of the mod I was thinking of disallowing adjacent trading posts (TPs). This would illustrate market saturation.

2. I would like to increase the gold that a TP produces if on a road connected to a city or adjacent to a river (+1 each). Also, I would limit growth to a hamlet if the TP is not on/near either. This would illustrate "Location, Location, Location".

And I feel these kind of balance each other.

#1 I can do myself, I will need help with #2 (though I still wish to be a part of the process).

The biggest thing that would help me is if you clarified some naming convensions... they do not seem to be 100% consistant. Also, I have started a thread on civ fanatics for more input in the creation & customization forum.

Thank you
Last edited by Proto_Noob_42; 31 Mar, 2016 @ 5:40pm
< >
Showing 1-4 of 4 comments
Proto_Noob_42 31 Mar, 2016 @ 6:05pm 
For instance, why in the lua to you have...?

local Trading_Post = GameInfoTypes["IMPROVEMENT_TRADING_POST_X"] local Hamlet = GameInfoTypes["IMPROVEMENT_TRADING_POST"]

Is there a reason that you cannot have...

local Trading_Post = GameInfoTypes["IMPROVEMENT_TRADING_POST"] local Hamlet = GameInfoTypes["IMPROVEMENT_HAMLET"]

or could, in my attempt to expand the code, clean up the naming of variables in an intuitive way?

Also, what is the purpose/function of...?

local Village_Prod_Dummy = GameInfoTypes["IMPROVEMENT_VILLAGE_PROD_DUMMY"]

You DO seem to use it a lot. Was/Is is just a debug thing?

Thanks,

Proto_Noob
Last edited by Proto_Noob_42; 31 Mar, 2016 @ 6:06pm
TofuSojo  [developer] 2 Apr, 2016 @ 8:33am 
Thanks for your interest and good on you for expanding to Lua modding! You may be interested to look over the past change notes and comments for this mod as I tried to implement #1 almost two years ago and failed. You can easily with xml prevent two of the same improvements from being built next to eachother, but the way my mod works is that each level of trading post is technically a different improvement! There is no way in xml at least, not sure about lua, to code for #1, but if I had to guess I would say write a lua that scans adjacent tiles for any trading posts and prevents the player from building more. Another problem would preventing the AI from doing hte same as it esentially ignored most changes to the UI as that is just for human players.

Ultimately though, I abandoned this idea because I didn't want to force people to not be able to build them adjacent if they didn't want to. Maybe they prefer clustered ones and often that might be the best placement strategically speaking on a given map.

#2 is both an interesting idea and at a glance quite easy to implement with lua. I don't know about balane though. The roads would cost gold to maintain, while the river would be free. But here's the biggest problem, how would the AI know to build roads to them or that they make more gold along rivers? AI logic pretty much requires a DLL mod, which requires C++ (real coding). You can only have one DLL mod active at a time, so it better be worth it. Personally, I'm satisfied with my mod that adds 1 gold along rivers and coasts to simulate local waterborn trade and the AI benefits from that as it's passively on the map.

You are starting in the right place in trying to fully understand my mod's lua. First, the basic trading post has an _X at the end to make it unique from the real Trading Post which my mod turns into the Hamlet. This is because previously the first level was called an Outdoor Market and the second a Trading Post, so to avoid confusing myself, I kept the name of the second the same in the code. Since I changed the first back to being called a Trading Post and the second to Hamlet though, the naming convention has become confusing to anyone who reads the code :P. I didn't bother going through and switching the first two improvements around just to avoid this as the mod already works fine and any time you make sweeping changes you are likely to break something.

Specifically the lines you quoted from the lua are refer to the xml file. If you changed the first it would work but flip the first two improvements with eachother. If you changed the second, you would get a big error that might prevent the mod from loading and certainly working right since there is no Hamlet improvement in the xml.

As for the Dummy Village, that is for Hills, which always give 2 prod no matter the terrain type. In the xml you'll see that the regular Village gives 3g and removes 1 food, while the Dummy gives 3g and removes one prod. If the dummy didn't exist, since HIlls don't give food, a village on a hill would yield 3g and 2p, a total of 5, when none should give more than 4, making hills the best place to build villages. This is not an issue with Towns, since they remove 2f and 2p, equalizing things. In the end, I worked very hard to keep this mod balanced.

Hope that makes sense. :)
Proto_Noob_42 4 Apr, 2016 @ 1:02pm 
Thank you very much for the information. Your long and very informative post is greatly appreciated.

As far as #1 goes, I have been told by experienced modders on civ fanatics that what I am trying to achieve would (mostly?) require a dll mod. While I have the spirit, my knowledge is not quite there yet. I was going to use this project as a stepping stone to dll modding, but I might have to come up with something else.

For #2, I agree that without the limitations of #1, it would absolutely be unbalancing. If you liked these ideas, I made about 7 more suggestions in a thread on civ fanatics here:

http://forums.civfanatics.com/showthread.php?t=565214

I do know vb.net and a little c#, so editing the dll is not out of the question, but there are many other dll mods out there that I really enjoy (Health & Plague, Immegration, etc.) so creating a dll for this would exclude me from playing those.

...unless I wrap all my favorite dll mods, and this one, into a single dll mod. Can you point me to your favorite dll mod tutorial (if you have one)? I like baseline civ V, but there are soooo many posibilities waiting out there that I just can't resist.

Once again, thank you for your time, and particularly, your positive attitude.
poundjd 2 Jul, 2016 @ 11:11am 
There is a Modder out ther that makes a DLL that incompasses the needs of over a hundred other DLL Mods http://www.picknmixmods.com/main/mods/bydate.html
< >
Showing 1-4 of 4 comments
Per page: 1530 50