Is there a way to copy the source code of a civ and then put it in Modbuddy?

Sgtwolf00

Potential genius
Joined
May 28, 2015
Messages
464
Location
Melbourne, Australia
As some of you may or may not know, I'm creating my first civilization mod and while I have the ideas, I don't exactly have the skills (yet). But I thought of something while doing my research for my civ, is there a way to get the source code of a civ, vanilla or modded and put it in the Modbuddy, from there I can edit it to match the requirements of my civ and then when that's done release it?

If that's not possible, then would following this modding guide be enough? Or at least be a great assistance http://forums.civfanatics.com/showthread.php?t=385009
 
XML data files for Standard Civilizations (inc DLC)

Mod Creation Tutorials:
  1. Derek "Keal" Paxton's Original How-To for CIV5 modding. Keal's guide is a little out of date in some particulars because he wrote it lo these many years ago and quite a few things have changed since then. It still, however, gives a good overview of how to mod in CIV5.
  2. The Newbie’s Guide to Modding Civilization 5 (by LuvToBuild)
  3. what ModBuddy setting for what file types tutorial (by whoward69)
  4. Modding Basics (by ceej12) This is a guide on Steam

For more tutorials, see : http://forums.civfanatics.com/showpost.php?p=13627035&postcount=2

Oh ok, thanks for the assistance! But you haven't answered my question regarding the file swap and then editing of it. It that possible? Or do I have to start from scratch?
 
Read posts #2, #3 and #4 on the first link (XML data files ...) it (indirectly) answers those questions
 
Ah I see now, I had a strong suspension that modded civs were 'clones' of actual civs, thanks for your help! You're tutorial looks quite useful!

Quick question though (since I'm going to be busy to today), how do I add things to the sub folder? I've made an XML folder, and can't find where to add things.

(Ignore the question, I was a big dummy and didn't unzip the folders.)
 
Don't know if anyone will answer but I'll post anyway. So if I want to make my civ mod, mod compatible. Especially with say 3rd and 4th UC mod, do I add those files to the XML folder now, or later when everything is done?
 
If you are in modbuddy, right click on the XML folder in the folder tree. You will have the option n the context menu to add new folder, existing file, or new file. If you are creating a file, choose, xml, sql or lua depending upon your choice. If you adding an existing file, select from within the file tree and add it.

Folder names are not important nor is file structure within your build (except for your own organizational purposes). What is important is setting the build to register the various files... either VFS true or as an addin of some type... the tutorials given should help in that.
 
If you are in modbuddy, right click on the XML folder in the folder tree. You will have the option n the context menu to add new folder, existing file, or new file. If you are creating a file, choose, xml, sql or lua depending upon your choice. If you adding an existing file, select from within the file tree and add it.

Folder names are not important nor is file structure within your build (except for your own organizational purposes). What is important is setting the build to register the various files... either VFS true or as an addin of some type... the tutorials given should help in that.

Okay sorry for the late response but you're saying that I can set a folder to either be VFS true, or as an addin. I'm assuming the modded folders are addins, but what does VFS do and stand for?
 
'Folders' within a modbuddy project are never set as anything for a Mod 'Action'. Only the individual files within your various folders are ever given an action-type.

VFS refers to the game's Virtual Files System. This is essentially a hidden in-game storage-box to which files are sent as complete files and where other code within the game can use the files present within the VFS.

So when you are adding Icon Files, you set them as 'Import Into VFS = true' in modbuddy, and this sends those files into the VFS 'holdbox'. Buildings, Civilizations, Units, etc., that need the icons within those Icon Files are then able to pull the images out of those Icon Files via the code under table <IconTextureAtlases>. This is one way in which the VFS system is used in-game.

You need to use Tutorial #3 listed in Post #2 as a reference for what types of files require what type of setting within Modbuddy.
 
'Folders' within a modbuddy project are never set as anything for a Mod 'Action'. Only the individual files within your various folders are ever given an action-type.

VFS refers to the game's Virtual Files System. This is essentially a hidden in-game storage-box to which files are sent as complete files and where other code within the game can use the files present within the VFS.

So when you are adding Icon Files, you set them as 'Import Into VFS = true' in modbuddy, and this sends those files into the VFS 'holdbox'. Buildings, Civilizations, Units, etc., that need the icons within those Icon Files are then able to pull the images out of those Icon Files via the code under table <IconTextureAtlases>. This is one way in which the VFS system is used in-game.

You need to use Tutorial #3 listed in Post #2 as a reference for what types of files require what type of setting within Modbuddy.


Okay so that tutorial will tell me how to change file types and what the file names means, but my question is. If i wanted to make my mod, mod compatible. Do I work on that now? Or do I do that after I've reskined and recoded everything?
 
Don't know if anyone will answer but I'll post anyway. So if I want to make my civ mod, mod compatible. Especially with say 3rd and 4th UC mod, do I add those files to the XML folder now, or later when everything is done?
There seems to be some linguistic confusion going on here.
  1. If you mean by the highlighted blue part:
    • Do I add the files from the 3rd and 4th unique components mod into my own mod?
    Then the answer is 'no'.
  2. If you really mean instead:
    • what do I need to do to make my mod be able to use the 3rd and 4th unique component system when both mods are active?
    The methods required to give compatibility will vary with every mod for which you want to add compatibility. I would have to take a look at the code in the 3rd and 4th unique components mods and the code in your mod in order to answer specifically for the combination of "your mod" + 3rd Uniques/4th Uniques. But the usual thing we do as a 1st step is to set-up a reference within "our" mod that tells the game that when both "our" mod and "the other person's mod" are enabled by a user, force "the other person's mod" to load into the game before our mod. We refer to this as a 'Reference' within ModBuddy: see Post #380 in the Enlightenment Era Mod's discussion thread on how to add a reference within "your" mod to make someone else's mod load into the game before "your" mod loads into the game.
Okay so that tutorial will tell me how to change file types and what the file names means, but my question is. If i wanted to make my mod, mod compatible. Do I work on that now? Or do I do that after I've reskined and recoded everything?
Generally I get my mod to work properly on its own before I begin to add the necessary ModBuddy settings, and necessary files (such as SQL files or XML files) to make my mod work with some other mod. I do this with as few mods enabled at the same time as is possible -- for me, this usually means my new mod and DonQuiche's IGE mod are the only mods running when I am making initial tests and trouble-shoots on my new mod.

The only exception is when your mod 100% requires the other mod to be active.
 
There seems to be some linguistic confusion going on here.
  1. If you mean by the highlighted blue part:
    • Do I add the files from the 3rd and 4th unique components mod into my own mod?
    Then the answer is 'no'.
  2. If you really mean instead:
    • what do I need to do to make my mod be able to use the 3rd and 4th unique component system when both mods are active?
    The methods required to give compatibility will vary with every mod for which you want to add compatibility. I would have to take a look at the code in the 3rd and 4th unique components mods and the code in your mod in order to answer specifically for the combination of "your mod" + 3rd Uniques/4th Uniques. But the usual thing we do as a 1st step is to set-up a reference within "our" mod that tells the game that when both "our" mod and "the other person's mod" are enabled by a user, force "the other person's mod" to load into the game before our mod. We refer to this as a 'Reference' within ModBuddy: see Post #380 in the Enlightenment Era Mod's discussion thread on how to add a reference within "your" mod to make someone else's mod load into the game before "your" mod loads into the game.

Okay, so don't work on it now and if I wanted to make my mod compatible with 3rd and 4th UC (or any mod for that matter) I would have to finish my mod and show it's code plus 3rd and 4th UC's code (or again what ever mod) to you. Yeah?


Generally I get my mod to work properly on its own before I begin to add the necessary ModBuddy settings, and necessary files (such as SQL files or XML files) to make my mod work with some other mod. I do this with as few mods enabled at the same time as is possible -- for me, this usually means my new mod and DonQuiche's IGE mod are the only mods running when I am making initial tests and trouble-shoots on my new mod.

The only exception is when your mod 100% requires the other mod to be active.

Okay so don't bother making my mod, mod compatible until the solution is 100% ready to be used, unless other wise. Okay I'm cool with that, got some more questions though. The main one concerning art and PS and what not.
 
Okay so I've got some more question relating modding, this isn't all of them though, but I'm not going to overwhelm you so I'll just ask about these three instead.

So first question relates to art, the person I'm having my art done works on PS, but she doesn't know how to upload them into the mod and there's no tutorials for PS art. All of the art tutorials are on gimp, so if you know how to upload PS works into the mod let me know!

Second question is about a feature, now my UB is going to have an ability that, allows trade routes to generate GG points but the city the trade route is going to has to have the UB, since that is it's ability. But my question is how do you code that in? The UB is a castle replacement if your wondering.

Third question is how do I recode the trait code? I'm using Rome's, so how do I change Rome's trait into mine, which is this: "Upon a buildings completion, it's :c5production: production can over flow into the next unit's :c5production: production.* +5% :c5strength:combat strength against cities per each ongoing trade route you have. *(10-15% maybe, we're gonna test run it)."

So, your response?
 
1) Doesn't matter what graphics package you use to create the images they MUST be in the DDS format - icons should be RGBA8 no compression (and the image must be a multiple of 4 in both dimensions), other images (maps, leader scenes etc) must be the correct size and DXT3/5 compressed

2) With a lot of Lua - you're going to have to check every trade route every turn and see if the source/dest cities have the UB and if so add the GG points to the appropriate city

3) Combat bonus per trade route can be done with hidden buildings, don't understand the first part
 
....don't understand the first part
nor do I since this is an established in-game mechanic where if Item#1 overflows on the production required, the excess can be applied to Item#2 in the city construction qeue (with of course the proper adjustments made so that the overflow that comes from a unit-production 'modifier' applied to Item#1 doesn't get to overflow into Item#2, and vice versa).

Also isn't clear to me on the second half whether he wants units to be given a combat bonues against enemy cities, or cities to be given a bonus against enemy attackers.

edit -->

Question #3 actually has three parts, the first of which is:
Third question is how do I recode the trait code? I'm using Rome's, so how do I change Rome's trait into mine....
You don't actually want to change TRAIT_CAPITAL_BUILDINGS_CHEAPER. Doing so would alter the trait not only for your new leader but also for Augustus Caesar as well. You want to 1st change the name of the trait to something new and unique, like TRAIT_TRADE_IS_GOOD so there cannot be any accidental overlap between existing traits used by the game and your new trait. You also need to make sure you copy/paste this new trait-name everywhere in your mod where ACaesar's TRAIT_CAPITAL_BUILDINGS_CHEAPER is being stated.

The rest of the quoted paragraph is, as both I and William noted, a bit confusing to us.

Here is an example from what I did in my Scipio's Rome mod, where I created a new 'version' of Rome with Scipio Africanus as its leader. So I had to make a new trait for LEADER_SCIPIO to use:
Code:
<Traits>
	<Row>
		<Type>TRAIT_RES_PUBLICA</Type>
		<Description>TXT_KEY_TRAIT_RES_PUBLICA</Description>
		<ShortDescription>TXT_KEY_TRAIT_RES_PUBLICA_SHORT</ShortDescription>
	</Row>
</Traits>

<Leader_Traits>
	<Row>
		<LeaderType>LEADER_SCIPIO</LeaderType>
		<TraitType>TRAIT_RES_PUBLICA</TraitType>
	</Row>
</Leader_Traits>

<Civilization_Leaders>
	<Row CivilizationType="CIVILIZATION_SCIPIO_ROME" LeaderheadType="LEADER_SCIPIO" />
</Civilization_Leaders>
Note that there is nothing in the definition of that trait except for the Description and ShortDescription reference tags. This is because the whole 'leader trait' is done via lua, and is game-mechanics for a leader that is not provided under the <Traits> table.
 
Also isn't clear to me on the second half whether he wants units to be given a combat bonues against enemy cities, or cities to be given a bonus against enemy attackers.

I'd assumed the latter
 
Oosh! Wasn't expecting so many big responses over night! Any way let's dissect this!

1) Doesn't matter what graphics package you use to create the images they MUST be in the DDS format - icons should be RGBA8 no compression (and the image must be a multiple of 4 in both dimensions), other images (maps, leader scenes etc) must be the correct size and DXT3/5 compressed

Yeah so it doesn't matter what medium you used to create the art, as long as it is or within the specifics you listed above you should be good?

2) With a lot of Lua - you're going to have to check every trade route every turn and see if the source/dest cities have the UB and if so add the GG points to the appropriate city

Yeah okay, but how do I code that in now? With Lua? Or XML?

3) Combat bonus per trade route can be done with hidden buildings, don't understand the first part

How do you add hidden buildings? The first part of the UA means that when a building is completed, a percentage of the production gets put into the next unit's production.

nor do I since this is an established in-game mechanic where if Item#1 overflows on the production required, the excess can be applied to Item#2 in the city construction qeue (with of course the proper adjustments made so that the overflow that comes from a unit-production 'modifier' applied to Item#1 doesn't get to overflow into Item#2, and vice versa).

Yeah in civ if something over flows it get's put into the next things production. What the UA does is it all ways takes a percentage out of a buildings production and puts it into the next unit's production. So you can get an army fielded quickly.

Also isn't clear to me on the second half whether he wants units to be given a combat bonues against enemy cities, or cities to be given a bonus against enemy attackers.

So for every outgoing trade route you have, it gives your units a combat bonus against cities. Reflects Rumite tactics very well.

edit -->

Question #3 actually has three parts, the first of which is:You don't actually want to change TRAIT_CAPITAL_BUILDINGS_CHEAPER. Doing so would alter the trait not only for your new leader but also for Augustus Caesar as well. You want to 1st change the name of the trait to something new and unique, like TRAIT_TRADE_IS_GOOD so there cannot be any accidental overlap between existing traits used by the game and your new trait. You also need to make sure you copy/paste this new trait-name everywhere in your mod where Caesar's TRAIT_CAPITAL_BUILDINGS_CHEAPER is being stated.

Oh so instead of TRAIT_CAPITAL_BUILDINGS_CHEAPER, change it to say TRAIT_TRADE_AND_WAR so it doesn't alter Rome's trait, and make sure you change all of the originals trait's name like you do for the other XML coding.

The rest of the quoted paragraph is, as both I and William noted, a bit confusing to us.

Here is an example from what I did in my Scipio's Rome mod, where I created a new 'version' of Rome with Scipio Africanus as its leader. So I had to make a new trait for LEADER_SCIPIO to use:
Code:
<Traits>
	<Row>
		<Type>TRAIT_RES_PUBLICA</Type>
		<Description>TXT_KEY_TRAIT_RES_PUBLICA</Description>
		<ShortDescription>TXT_KEY_TRAIT_RES_PUBLICA_SHORT</ShortDescription>
	</Row>
</Traits>

<Leader_Traits>
	<Row>
		<LeaderType>LEADER_SCIPIO</LeaderType>
		<TraitType>TRAIT_RES_PUBLICA</TraitType>
	</Row>
</Leader_Traits>

<Civilization_Leaders>
	<Row CivilizationType="CIVILIZATION_SCIPIO_ROME" LeaderheadType="LEADER_SCIPIO" />
</Civilization_Leaders>
Note that there is nothing in the definition of that trait except for the Description and ShortDescription reference tags. This is because the whole 'leader trait' is done via lua, and is game-mechanics for a leader that is not provided under the <Traits> table.

Oh I see what I have to do, so I create the new trait via Lua? Okay then, I'll comeback to you if I get stuck then. Thanks!

I'd assumed the latter

The latter of which sentence?
 
Back
Top Bottom