I want to try my hand at making some new civs. Have no idea how to do it.

lungora

Delkhiin Khatun
Joined
Apr 14, 2013
Messages
61
Location
Canada
I've got my designs here. They're tidy and simple, especially compared to what I see a lot around these parts. I'm interested in making them a reality. I know my way around xml stuff well enough, and can make myself shoddy graphics - but I'm clueless on any of the steps needed to do this.

Are there tutorials, helpful guides, templates I can work off? I've done a lot of digging - but it's hard to tell between things that are outdated, or new, or current use.

Thanks in advance,
Lung.
 
The first things you can do is download the Civ 5 SDK from Steam and enable error logging. Here's a link that's help me. There's a list of tutorial links on the second post.

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

SDK's in place. I make maps for this game, you've probably seen a few if you've passed by the workshop. As for logging, that's done too - I need it for calibrating my mod lists.

As for the link, very much appreciated, will do lots of reading now.
 
So, I'm working on making my Khamug Mongol Design a reality - and I've got a lot working. The UU is great for now, if using temporary art. I haven't touched the UA yet.

However, I'm working on the UB. "Steppe Ger - Replace stables. Unimproved tiles yield +1 production. +10% production on mounted units. +1 production on horses. 1 maintenance. Requires a source of Horses, Sheep, or Cattle in working range of the city. (no normal bonuses)"

I've built it off the Ducal Stables, and that's working fine. I removed the gold, XP, and 5% mounted production that I didn't want. I cut the production bonuses from sheep and cows. I'm just stuck on the last chunk where i want it to give production to all unimproved land tiles. I assumed that I could do it by pointing out the different terrain types with a Building_AreaYieldChanges thingo and then state that it should happen only on tiles without improvements, but I can't seem to find a way to single out unimproved tiles. How would I do this?

And, about the UA, I'm assuming it should be pretty easy to do by creating an invisible dummy building stable for the first clause. I'll need to learn how to do that, but it should be simple. The second clause however, how would I pull off giving the player a bulk sum of gold with DOWs? And how could I code this to make it dynamic based on eras?
 
UA = Unique Ability
UB = Unique Building

You seem to be using the two interchangeably and thereby causing lots of confusion as to what it is you are trying to accomplish.

------------------------------------------------------------------------------------------

I assumed that I could do it by pointing out the different terrain types with a Building_AreaYieldChanges thingo and then state that it should happen only on tiles without improvements
  1. There is no game-table called Building_AreaYieldChanges
  2. See this post for information on table <Building_AreaYieldModifiers>
  3. Long Story Short = no
    • Neither table Building_AreaYieldModifiers nor any other table within the Buildings-Schema of the XML will not accomplish anything like what you are attempting.
  4. About the closest thing I can thing of off the top of my head is table Trait_UnimprovedFeatureYieldChanges, but that table references to Leader-Traits and Unimproved Features such as Forest or Jungle
And, about the UA, I'm assuming it should be pretty easy to do by creating an invisible dummy building stable for the first clause.
This is where the terminology 'UA' as you are using it is confusing. However, assuming I understand what you are interested in, use:
Code:
	<Trait_ImprovementYieldChanges>
		<Row>
			<TraitType>TRAIT_FIGHT_WELL_DAMAGED</TraitType>
			<ImprovementType>IMPROVEMENT_PASTURE</ImprovementType>
			<YieldType>YIELD_PRODUCTION</YieldType>
			<Yield>1</Yield>
		</Row>
	</Trait_ImprovementYieldChanges>
Except replace Oda's "TRAIT_FIGHT_WELL_DAMAGED" Trait-name with your leader's Trait-name.
The second clause however, how would I pull off giving the player a bulk sum of gold with DOWs? And how could I code this to make it dynamic based on eras?
LUA scripting will be required.
 

Thank you for this advice. I did happen to type the wrong term in one spot above, sorry about the confusion.

I've adjusted the Building a little bit to be something I could do with the XML, and it's working great.

Now I'm just lacking the two pieces of the UA, the gold on DOWs and the mounted production modifier. You say this/these will require LUA, is there somewhere I can look to figure out how to implement this this, or any mod already doing about the same thing I can try to reconfigure to fit mine?
 
http://forums.civfanatics.com/showthread.php?t=494241

Maybe check out Kongo and Mercia from this thread? - Part of Kongo UA make Archer train faster and Mercia trigger Golden Age when you're at war. Not really sure about LUA that give you lump sum of Gold, JFD's Lincoln might have it.
 

Thanks for the suggestions.

I managed to do some searching and figured out how to set up a dummy building for the production modifiers. So that seems like it works - I think, I made the dummy building not hidden to see if it was showing but it doesn't seem to. I think i can figure this on my own.

As for Lincoln, I dug around in his code but honestly most of it barely makes any sense and I wouldn't know where to start.

What about the gold the game gives you when you don't complete a wonder? Could that be reconfigured somehow?
 
If you ask nicely enough you can get someone to do the LUA for you actually, particularly given that people have shown interest in the project, if I were you I'd PM Bane_ asking if he can do the LUA for this civ and/or tell you how to do what you want.
 
Well, with a proper LUA knowledge from someone you can insert this code in, but I have sloppy LUA knowledge, so this is the best I can do, someone should correct me.
Code:
function WarDeclaredOnCode
if Team:GetLeaderID() = GameInfoTypes["LEADER_TYPE"] and Team:IsAtWar() then
Player:ChangeGold(pPlayer:GetGold() + anynumberyouwant)
end
end
This code checks if your civilization is at war. If you are at war, give a lump sum of gold. I haven't a single clue if it would check for more than two war. You would add the gold via:
 
There's got to be a trigger for when a war starts though, otherwise JFD's Alexious Komnenos ability wouldn't quite work.
 
Untested:
Code:
local iBaseGoldOnDeclareWar = 20
local iEraMultiplier = 1
local iRequiredCiv = GameInfoTypes["CIVILIZATION_ROME"]
function GetGoldForEra(player)
	return (iBaseGoldOnDeclareWar * (iEraMultiplier * player:GetCurrentEra()))
end
function KhamugMongolGetGoldOnWarDeclare(teamID, otherTeamID)
	local playerID = Teams[teamID]:GetLeaderID()
	local player = Players[playerID]
	local otherPlayerID = Teams[otherTeamID]:GetLeaderID()
	local otherPlayer = Players[otherPlayerID]
	if (player:IsAlive() and player:GetCivilizationType() == iRequiredCiv) then
		player:ChangeGold(GetGoldForEra(player))
	elseif (otherPlayer:IsAlive() and otherPlayer:GetCivilizationType() == iRequiredCiv) then
		otherPlayer:ChangeGold(GetGoldForEra(otherPlayer))
	end
end
GameEvents.DeclareWar.Add(KhamugMongolGetGoldOnWarDeclare)
You would need to add the code to an lua file within the mod, and activate the lua file as an InGameUIAddin as shown here: whoward69's what ModBuddy setting for what file types tutorial

You will also need to change "CIVILIZATION_ROME" to whatever is correct for your civilization, and adjust the Base Gold number and the per-era multiplier as desired.

As written the gold would be added whether the Khamug Mongol do the declaring or are declared upon.
 
GameEvents.DeclareWar.Add()

Is there a list for these GameEvents? I can't find DeclareWar.Add in the modiki.
 
Top Bottom