How to create a new unit with xml ?

SoundWipe

Chieftain
Joined
Apr 23, 2017
Messages
1
Location
Moselle, Lorraine, France
I want to create a new unit for Civilization VI but I'm a total newbie with ModBuddy. Does someone know a good tutorial to learn xml ?
 
I would recommend reading through this guide (https://forums.civfanatics.com/threads/modders-guide-to-civilization-v.385009/) for Civ V if you are brand new to modding. It's not completely up to date but it will give you a good introductory overview...and a good deal of it is applicable to Civ VI as well.

If you're looking for tutorials in general xml or sql, a quick Google search should bring up multiple tutorials and references. Honestly, a tutorial reviewing the languages themselves is a bit outside the scope of this forum, especially given how many resources there are just a search away.

If you want to learn more about xml and sql specifically as they relate to Civ VI, my best suggestion is to start trying things. Poke around in the game files, look at the different tables and what kind of data they hold. Try tweaking some values in the files and see what happens in the game. If you break something you can always verify the integrity of the game cache and Steam will redownload any files you messed up. Also, download other mods and take them apart...this is probably the single most helpful thing you can do. Many mods are very simple, so it's easy to figure out what's going on.

But at the end of the day you won't receive much help from the community if they don't see you trying. So, try some stuff, see what happens, and if you have specific questions come back and you'll receive help.
 
A good first thing to do is to download a mod that does something similar to what you want (ie, one that adds a new unit) and see how it works. Tweaking existing stuff is way way easier than creating something completely new.
 
Modbuddy has a template for units. I managed to create a unit with custom icons and all... but I gave up when it came to the actual 3D unit and that artdef file. For a game that claims to be the most modable civ to date, it really sucks. How succesful is modding if only 1 or 2 mods are out there with units?
 
The devs picked the ability to give lots of freedom to mod developers to do a very wide range of things over the convenience of it being easy. The modifier system is a great example of this, it is rather cumbersome to use but has opened many, many doors for modders that were simply not available in previous versions. Whether that is a good or a bad thing is subjective, but there are ~1000 mods on steam workshop which suggests a fair number of people can do at least basic mods.

As for getting a 3d model to work, this is not so bad. Creating genuinely new art is hard (and requires the pain that is Blender) only because creating 3-d models of stuff is intrinsically difficult. If you just want to combine different existing models together or recolour them: say, give cavalry a musket as a weapon and make their uniform yellow, it isn't too bad. There are some guides on the forum on how to use ArtDefs and it can be done fairly quickly.
 
Well, I just wanted that. I just wanted a swordsman with the spearmans shield and some other colors to get started. XML and Lua makes sence and I can use blender, but I am not an expert.... but all that is worth nothing when the artdef file might as well be written in Klingon. And instead of every modder having to guess what goes where, it would be nice if Firaxis made a guide.

And there's ~800 mods for civ6 after a year. ~7600 for civ5... a lot of it is trash anime mods tbh. I know it's an unfair comparison, but the modding in civ5 was more and better. Well, just my opinion. I'd like a "Unit Creator" and "World Builder"... then the game might be the most modable.
 
The Civ5 modding scene was not better a year after launch.

I think it's actually easier to create new units now than in 5 because of the Asset Previewer...you can reconfigure existing units in any number of ways and preview how they'll look. So there's already a Unit Creator. There are several guides on the tutorial section.

But I do agree that it's baffling that they haven't released the World Builder.
 
Top Bottom