I'm back!

Mylon

Amateur Game Designer
Joined
Nov 4, 2005
Messages
1,013
Many of you may remember my modding work for Civ4. I just got my hands on Civ5 and I'm giving it a good look over before I sink my teeth into the SDK.

The game is certainly... Different. I love social policies and how happiness is now a global effect, but the emphasis on flat bonuses like Maritime civs, communism, watermills, etc encourage ICS more than in Civ4. It's weird. I do like how strategic resources are handled. The first thing I would mod would be to make great people a civ-wide event just like happiness, so one need not fuss about tons of wasted GPP and otherwise optimizing it.

Other than that, I think I need to focus on something in particular to make a good mod. Rise of Mankind did a pretty good job at keeping the Vanilla flavor but expanding gameplay, but Fall From Heaven got all of the attention. :)

I've been wanting to make a space 4x game, but Civ4 has the graphics for it and Civ5 does not. My combat model was originally designed for Civ4's stack of death, using components and other fun stuff. Civ5's combat style really wouldn't fit space, though I do like how fights are no longer to the death and I will keep that.

I do tend to prefer economy-focused play, so other things I would change would be to make the other resources more like strategic ones, making it possible to consume them with units or buildings. Military units need to consume multiple strategic resources in late game (so a tank may suck up 2 iron, 1 oil) and cities also need to be slightly weaker. It seems like it's possible to defend a whole front with 3-4 melee units, and 2-4 siege/ranged units, which seems kinda silly.
 
Some ideas I'm kicking around for a vanilla-flavored mod:

Let capitals benefit from railroads. In my first game I built the Ironworks in my capital, only to realize it doesn't get the +50% railroad bonus! At the moment, unsure of how this ought to work, give the capital the improvement immediately, or once the first city is connected?

Change Great Generals. Their initial bonus ought to be 10% and increase over time as they earn exp. They'll be more infrequent and, given how important they are, possibly immortal. Leveling up a great general may also allow it to increase it's command radius.

Make great people global. It seems odd that happiness, social policies costs and great general points are global, but GP points are not.

Change a number of buildings to be per-population, much like how science buildings work. This ought to be a nice way to combat ICS. Done with culture as an example, this would change the optimum number of cities on a huge map from 7 to 1 for the purpose of maximizing social policies.

Allow multiple copies of some buildings. One of the advantages of ICS is it means its possible to build more buildings. Multiple buildings in the same city would make this less appealing.

Replace % food retained on growth with +% food. Not nearly as big of a bonus, but this would make these buildings much more appealing.

Change trade route cash. Trade routes seem to barely pay for the cash required for the roads and they're not multiplied by markets and banks. They really need to scale better into the end game and some kind of foreign trade needs to be added. So it doesn't get out of hand, one trade route per player instead of tying it to cities for foreign trade.

Diplomacy. This one is mostly a pipe dream, but it would be nice to make diplomacy more dynamic and applicable between players. Something like having influence points with city states, but with major powers too. Small bonuses if you have positive influence with a major power and penalties if you have negative influence, and combat with that nation brings influence back to a point where there are no penalties (to encourage war between players that may otherwise be friendly). This could be expanded upon with espionage and denouncements, which could make the people of one nation hate another player and force them to break up their alliance. This would make playing Diplomacy part of the game as well instead of permanent teams.
 
I like some of your ideas, and others not so much.

First, the Railroad bit has been fixed by several mods (Dan's Railyard being the most well known).

I disagree with the multiple copies of buildings simply from an aesthetic point of view, but understand the appeal. I also disagree with the global great people piece, as it further throws away the concept of city specialization, which I think is important.

Overall, I believe you have the right idea to approach the mods on making other non-ICS strategies better.
 
Multiple copies of the same building already exist in some form. Monument, Temple, Opera house is just an example of buildings that all provide culture. Same with the happiness buildings. Coliseum, stadium, etc. Ideally, it would be nice to have about 20 buildings all in a chain as some kind of pre-req so it stays interesting, but even with multiple cities you're still spamming the same building in different smaller cities. Short of lots of extra art and putting a limit on it, why not skip requiring multiple cities and build multiple of a building in the same city? Keep in mind this will be for specific cases, like flat bonus buildings like +1 production or +1 food or +1 gold and specialist slot buildings. I intend on making culture per-population like how science is, though it may also have repeatable buildings.

The reason I want to change how GP works is it seems like I have a lot of wasted GP points. Only my GP city is typically going to generate GP and usually only 1-2 kinds, all other GP points are wasted.
 
I understand the GP concern. Honestly, I think the better approach would have increasing costs be only adherent per GP type, rather than by city. So if my first GS costs 50 points, once I get it, my first GE should still only cost 50 points.

The biggest issue with the system as it stands is that it penalizes players for building wonders in the sense it removes GP control from their hands.
 
I like some of these ideas. Looking forward to some new systems. :)

I understand the GP concern. Honestly, I think the better approach would have increasing costs be only adherent per GP type, rather than by city. So if my first GS costs 50 points, once I get it, my first GE should still only cost 50 points.

The biggest issue with the system as it stands is that it penalizes players for building wonders in the sense it removes GP control from their hands.

I agree on this and would like to see that changed. Global GP is also an idea that could be pretty good, especially with the cost increasing per GP type as well.
 
Right, making the different great persons should be separate so they don't step on each others toes and cause more wasted points.

I made great people into a more organic function in Civ4 in my mod by making each GP born increase the points required for everyone by a small amount, yet the points also go down by a percentage each turn. Thus it's possible through a powerful GP factory to reduce the GP growth rate of other players. The cost reduction also made late game GP production more sustainable.
 
Wow, lua scripting seems pretty intimidating. I know it took me a long while before I got the hang of the python scripting of Civ4, but the modular nature of the game means I don't have to tweak existing files, I can just throw my code in there. Maybe. This'll take some getting used to.
 
Lua scripting takes a bit to jump into, but once you get the hang of it, it is actually a pretty great language.
 
It's not the language that's bugging me, I just need to get my bearings onto where I can hook into the game. If I understand correctly most lua mods are incompatible because they all require changing an important file?
 
The opposite, actually. The only cases where you need to overwrite vanilla files tend to deal with unit models, tooltips, etc.

In many cases where there was a logjam, the community has come up with solutions. Examples are the DiploCorner, Notifications, and using Contexts instead of overwrites where possible.
 
More ideas: Barracks and similar buildings will train units within 1 tile at the rate of 1 exp per turn per building up to the level that the barracks and other buildings provide, thus making these buildings more useful, even if an empire only requires one with some micromanagement.

Training promotion. Granted for free at the second level barracks building. Grants +1 exp per turn to all nearby units, up to 15 exp per level of promotion. Units can only train units of a similar type (land units cannot train naval units or air units). This may make the above idea of barracks training units obsolete.
 
Sounds great once we have source code access to give the ai the abilit to do this
 
I remember way back I got my hands on a DLL editor and I tinkered with it a bit. I had no idea what I was doing, but I wonder if such a tool could be used to make game rule changes like what we're lacking currently. A lot of the DLL editor seemed to revolve around editing UI, but that could simply be what the DLLs I was peeking into contained. If I'm especially bored and daring I could look into this to try and get a head start before the SDK is released. :)

More ideas, as this is my dump place for them:

Have a "Cornerstone" set of buildings of relatively cheap to build buildings that scale based on the city's size. Monument for culture, Workshop for production, Market for gold, Granary for food, library for science. These buildings will provide bonuses based on the population. +1 per pop for monument, +1 wealth per 2 for market, +1 science per 2 for library, +1 hammer per 3 for workshop, and +1 food per 4 for granary. These 5 buildings will be practically required for any city. Most notably none of these buildings will have specialist slots. Buildings to add specialist slots may be what I make repeatable.

Also, thinking of changing the watermill to be +1 hammer per river tile at a more expensive price, similar to the hydro plant. +1 hammer +2 food encourages ICS, whereas +1 hammer per river tile means cities 7 tiles apart can still fully utilize the river. The food bonus ought to be covered by changing the granary to a per pop bonus.

I'm also considering changing food required per population to 3 per, and adjusting food income in general to match. This way the -1 food to support specialist SP combined with extra food and extra specialist slots won't bog things down. This also opens the door for food bonuses to add +5% food production civ-wide, making wheat, cow, sheep, and deer more useful. As well as other new resources if those are added.

I'm still debating how to address happiness. I played NIGHTS recently and making population produce happiness instead of the other way around (and number of cities and military units produce unhappiness) seemed to be an interesting change of pace.
 
Okay, I've made the first steps towards my mod, but nothing is actually working. The XML is supposed to set the culture per turn from buildings to 0 and the lua is supposed to add culture per population. I added the XML to the ModActions tab so it'll update the database, but that's not working. Nothing I've read in the modding tutorials state that the lua needs to be added in the content section unless it's a UI add-on like the clock example in Kael's modding guide. So it seems to be a failure on both ends.
 
Any Lua files that are not Content addins need to have Import to VFS set to True under their properties.
 
Yeah, so many little things that seem to get glossed over in the guides and stuff.

Essentially I have 2 components to my current mod. The first changes building XML to be per-pop. It seems the error I was running into was how I had tried to filter only traditional buildings and leave wonders and national wonders untouched.

The second part is the lua where I re-add culture based on buildings present, population, and culture rate modifier.

So far the XML I'm using to remove the existing culture is this:
Spoiler :

<GameData>
<Buildings>
<Update>
<Set Culture="0"/>
<!-- <Where ConquestProb="66"/> -->
</Update>
</Buildings>
</GameData>


The commented portion apparently wasn't ever true, so monuments would still provide +2 culture. Commenting the portion stripped all buildings of their culture rate, which is fine for temporary testing purposes. I do not know if it's possible to do greater than operator in XML.

As for the lua, there seems to be very few events to hook into. If I understand the wiki correctly, ActivePlayerTurnStart only applies to actual players, not AIs, so my planned implementation may require iterating over all cities every human player's turn, instead of merely all of that player's cities on that player's turn.
 
What defines what a content addin is anyway? I want to add new rules and functions (I'm not replacing any existing LUA files/functionality), but it's not a UI mod either.

Using this code for my lua script, though it doesn't seem to be having any effect. Note that I have defined the new XML referenced. I'm not seeing the print in the firetuner console:

Spoiler :
Code:
function UpdateCultureRate()

	print("Updating City Culture Per Turn from Buildings")

	local iPlayer = Players[Game.GetActivePlayer()]
			
	for pCity in iPlayer:Cities() do
				
		local NewCulture = 0
		local OldCulture = 0

		for row in GameInfo.Building_CultureChangePerPop() do
			
			if pCity:IsHasBuilding(GameInfo.Buildings[row.BuildingType].ID) then
																	
				NewCulture += row.Culture * pCity.GetPopulation * pCity.GetCultureRateModifier() / 100

			end
		end

		for row in GameInfo.Buildings() do
			
			if pCity:IsHasBuilding(GameInfo.Buildings[row.BuildingType].ID) then

				OldCulture += row.Culture * pCity.GetCultureRateModifier()

			end
		end

		local TotalCulture = NewCulture + OldCulture

		-- Every turn we set Culture Per Turn from Buildings to 0 and re-calculate it.
		pCity:ChangeJONSCulturePerTurnFromBuildings(-pCity:GetJONSCulturePerTurnFromBuildings())
		pCity:ChangeJONSCulturePerTurnFromBuildings(TotalCulture)

	end
	
end

Events.ActivePlayerTurnStart.Add(UpdateCultureRate)

One peculiar feature I've noticed is ModBuddy does not recognize the structure of my code. That is, if I load Valkrionn's Economy Mod, his lua files come with buttons in the margins to collapse sections of code. My own lua file does not have that option in modbuddy, but it does in Notepad++.
 
I'm finally making some headway on my mod. I've got the CulturePerPopulation component completed! Now monuments, Opera Houses, and Museums all add culture based on the city's population! As do many of the other unique buildings that also add culture. Everyone has been balanced to provide the same amount of culture for a city of 5. For larger cities, they'll produce even more culture!

This includes the XML to update building culture levels including a brand new XML table, new help texts to inform about income these buildings provide, as well as Lua script to update each city's culture generation each turn in case it has grown.
 
Back
Top Bottom