Civ4 XML editor projected

Ok, so I wrote a lot of stuff about why this was the best idea ever. Then i accidentally hit the back button because i have my mouse scrolling enabled for that, and i lost it all. So I'll try recreate this, but I assume it will lack the passion the first version had. When I get it back I'll rewrite it.


First of all, this is the greatest idea ever because of how we'll all benefit. Curently there are a lot of people are there who want to mod, and they have some really great ideas. But they don't know how to do it. If we built a program that let anyone mod the simple things, we'll all benefit from being able to use what they create. Currently they're restricted by what they don't know: the scary open-up-this-file-change-these-10-things thing. Its kind of an economy thing, opening up modding to everyone will make them more available.

So I propose a basic framework for this modding program:

1. Its simple to use. Maybe have it be a wizard style program, so anyone can use it, and it takes you through all the steps. It doesn't need to change everything, just start out with the stuff most people want to change.

2. It mods correctly. Since the idea behind this is "mods for us all!" the program needs to do it correctly. That means not changing original files and making sure whats created gets put in the right place. After all, since we want people to create mods, we want them to be stable and consistent. We don't want people randomly dispersing information about where to put folders and what files to delete. Bad idea! This program should create files, and be open about where they go and how to do it.

3. Along the lines of #2, this should definitely educate people. If people know more about how modding works, they'll be more interested. So explaining how mod files works should be a priority. Not just XML jargon, but people should understand if they create a new civ they'll have to load it, and will the other civs still be there, and how do they play with thiers, etc.

Ok, before i lose this post, I'm gonna save it. Next up: A prototype program description
 
Ok, basic program description. Before we start, I'd like to say a little about how i think this should be accomplished. First, I'm a big believer in reality. And currently we have a few realities. First up, we don't have people with a lot of time. This won't probably be completed by one person. It's likely to take many people, and some people will start and be unable to finish. Thats going to be a reality, lets not let it bog us down. So if you're going to help, be realistic about what you can accomplish. Document what you do, if you have to pass it on, make sure the next person can pick up where you left off, instead of having to start from scratch.

Another reality is that there are some things that are easy to mod, and some that aren't. Lets face it, creating a new 3d leader that talks to you and has personality is probably beyond our reach. Lets allow people to do things, and use what the game provides us with when its not feasable to change it. Lets not try and reinvent the wheel where its plain we won't get it done.

Edit:

Now for the program description. To begin, I say we decide whats easily moddable, and try do that. For instance, giving things different names is probably easy. Giving things diferent attributes is probably a little harder, but possible. changing how things look, ie the 3d models for units, buildings and leaders, probably beyond us and everyone else at this point. So thats being said, how about this:

Civ Mod Wizard Prototype v.01

Enter Civ Mod Wizard:

What would you like to create? [New Civ] [New Unit] [New Building]

-----> lets say they chose new civ

What would you like the new civ to be called? [enter name]
----> There are a few other things in the XML here that require more questions, i don't know them all, but it needs to ask for all the things for the civ to be called. ie English Empire, England, English, etc.

Enter a civ description [enter description]

Enter the Civ's Civilopedia Description: [enter description]

Choose the Civilization's colors [drop down menu]

Choose the civilization you wish to base this on [drop down menu]
----> This would use that civ's flag, etc

Choose the building style for this civilization [drop down menu]
----> ie. Europear style, Asiatic, etc..

Choose the civ leader you want [drop down menu] [chose 2d picture from file]
----> this allows a person to chose a leader head different from the civ's colors they want. Its also important because people won't be designing thier own 3d leaders anytime soon. But we may want to have the option to chose a picture to put in place for displomacy. Obviosly this would have length/height requirements.

Chose this civilization's traits: [drop down] [drop down]

Choose the starting technologies for this Civ [existing starting combos] [ drag and drop from tech tree]
----> this would allow someone to use some of the existing combos ie. mining/fishing, or to chose from the tech tree to create advances civs that have have some or most of the tech tree at the begining of the game. Another option may be to be able to pick by ear. ie. this civ starts with all medieval techs. This would help people to make sure they got them all up to that point, so they don't have to keep looking through the tree every time to find the medieval traits for each civ they make in a medieval scenario for instance. (or modern scenario, etc)

End

This list obviously isn't complete, and there are some more questions that would need to be asked, i know cause i saw a list somewhere of all the things able to change, but its a start.

Up next, Unit modding
 
Lets decide they want to create a new unit.

What would you like to create? [New Civ] [New Unit] [New building]

----> new unit

What will the unit be called? [enter name]

Which existing unit will this unit look like? [drop down menu]
----> This will give each new unit the appearance of an existing unit. Obviously people may want to chose a skin, but that can come later. I don't think its possible yet for people to create new 3d wire meshes of units, so each new unit will have to be based on an old one.

Unit Attributes:

Base this unit's attributes on: [existing unit] [let me choose all attributes]
------> this will save time if someone just wants to create a swordsman called something else. However, one possibility might be they can pick an existing unit, which "fills in the blanks" so to speak, but still allows them to change an attribute. For instance, your special swordsman may just have 1 extra strength than a regular swordsman, and instead of finding out every attribute a swordsman has, you base it on a swordsman, it gets all those attributes (+10% city attack, etc) and then you just change the strength. This will save time.

I think the attributes of units are: (not complete list yet)

Strength
Movement
Promotions
Type (melee, gunpowder, sea unit, air unit etc)

What tech enables this unitto be built? [choose tech] [choose multiple techs from tech tree]

What requirements are there for this unitto be built? [drag and drop]
ie. level 5 unit promotion, etc. I've no idea how to work this, just like in buildings. Someone smarter will have to figure this out.
 
Lets decide they want to create a new building:

What would you like to create? [New Civ] [New Unit] [New building]

----> new building

What will the building be called? [enter name]

Which existing building will this building look like? [drop down menu]
----> This will give each new building the look of an existing one. People would chose the one that looks like the closest to what they want. Hopefully in the future someone can mod a 3d wire mesh generic building with a sign out front you can change, but for now, since the game is 3d, and you can zoon in on cities, i don't think new looks will be created anytime soon. Therefore, new buildings will have to look like old ones.

What will this building do? [Drag and Drop] [chose an existing building's attributes]
Since buildings can do almost anything, this will probably be large. For instance, they can increase production by 20, 40, 60, 80 percent, or do the same to science, gold, etc. Or they do city defenses, etc. Someone will have to find out everything they can do, and then someone would pick that category and put the number in they want. ie. gives specialists 2 extra hammers. Since this is probably moddable in itself, the program might need to be able to be updated in what can be changed. ie. somone would add the choice to give units automatic promotions. In our case, we should limit it to what the game already does, to make it manageable. So find out what each building does, and let that make up the base of categories for whats moddable.

What tech enables this building to be built? [choose tech] [choose multiple techs from tech tree]

What requirements are there for this building to be built?
I'm not sure how to do this one, but an example would be ironworks with 5 forges or whatever. The problem arises when they create a new building, and then create a second new building, and you have to build 5 of new building 1 in order to build new building 2. Someone with coding will have to figure that one out.

I'm sure there are more things to ask, I'll add them in later with suggestions/
 
Lastly, there is the scenario aspect to this program that needs to be figured out. For instance, should a scenario manager be included? Maybe that comes next. It would allow you to pick a map, pick the civs (from normal ones, and ones you've created) pick thier techs, pick the units available to each civ, etc. Letting people create just one civ is ok, but showing them how to use multiple created civs in one game with created units will be helpful too. Maybe this is really a question about file placement in the mods folder, i don't know, but we should think about it.

EDIT: One final note. This might all be included in the SKD. I don't know, i don't even know what that is, but who wants to wait until 2006 right? :)
 
i am sorry i haven't posted so far this week.
I've been staying late at work since last saturday, so i really had no much advances.

Tech Info:

Thank's for the proposed help, i am planning on using SWT, as one of you said earlier.
One of the problems i encountered was with the schema types, Civ iV doesn't use standard W3C schema, but uses Microsoft standard instead, i must assume this is because they need it for MSXML parser (as it is the best parser for C++ under windows) , but it is really making me work a lot, first i had to found a utility to translate beetween schemas (so i don't have to do it mannualy). And then use the output of that program to generate the classes wich represent the XML. I have succesfully done this, I think i can get a working version in 4 or 5 hours of programming, it's just that i don't know when i will have them.

End Tech info:

I am sorry i kept you waiting, i hope i can realease the first beta on monday, but i cannot promise anything, thing are really tough at work :S

Thanks to you all again for your help and support.

Vino
 
wow!!! amazing greencardman!!!
thanks for everything!! i guess you hit the spot!! that's definitely what we should do!!
As i said, i think i can get something for monday, based on what you've posted, i think it will be part of the civilization wizard.
I think that the wizard idea is excellent, however, i'd keep on my mind that "advance modders" will always prefer a more complez user interface, in wich they can mod a lot, without loosing so much time. However, as this program is targeted not for them, at least, not at the begining, i think the wizard will be ok.
A i must agree with you about the time of development and the development process on itself. I don't know yet how can we accomplish a real parallel programing, we'd need a CVS, i guess we could start a sourceforge project and take advantage of their own. Do you know of another public CVS that we could use.
Are there any other JAVA programmers willing to help?
As soon as i can, i will upload the project and let you know how to download everything from it. That'll be for the sources. I think the releases should be done through this thread.
 
Hmm.. I'm not really a programmer, so I'm not sure what a CVS is. I was just trying to put some ideas out there so people would get more interested, (and be on the same page) because this seems like such a great idea, but the interest was lacking.

My post was really to illustrate the point that with a little extra effort this could turn into something completely amazing. And yes, my idea was that this would be geared towards beginners, or at least non programmers. The more i thought about it, the more i realized that simply being able to change 3 things: civs, units, and buildings, would open up such amazing modding. I think civics might come later. But I think you're right about more serious modders wanting more. But hey, they can go into the xml themselves, right? :) Having a program that does civs, buildings and units will definitely cut down on what i believe would be the majority of any modders time though, serious or not.

On another note Vino6, seeing as you seem to be the only one interested, I'd suggest keeping it as simple as possible, while hopfully programming it (the program itself) to be able to be modded easily. If you make a wizard for changing civs, prehaps someone else can add on the wizard for creating units, using your code as the base. This means you'd have to release it under a GPL or without restrictions, or whatever, but i got the idea that wasn't going to be a problem. But programming from the start to make your program easily changed will benefit everyone, most not least of all you, because then you'd be able to comfortably stop at whatever level you're done at, and someone else can easily pick up the reins.

On a last note, even though I'm not a programmer, i think i get the feeling for what XML entails, and doing something as simple as creating a new civ requires a lot of work that someone using the wizard won't see, like finding every file that needs to be changed and changing it right, so someone creates a civ perfectly every time. The good nes if that i think some people have identified already what can all be changed. I'll try to find their posts and copy them here so people don't have to go looking for them, i hope they won't mind. On the other hand, finding all those variables in the XML and making your program change them correctly, well, thats a lot of work, hopefully we'll get a few more people on board for that.

GCM
 
I was thinking the same thing.
Instead of having stuff in text it would be in button and drop down form.
One field would point to the "production modifier" entry on the XML file, etc.
It wouldn't work as well for new types but could change existing ones easy.

I actually downloaded an xml editor.
It just has lists that can be opened and closed and point to values.
The lists could be changed into tabs and drop-down lists to have the same effect.

P.S. Is it legal to upload on of the xml files to CFF?
I have them on another computer but want to access them here
If not then does anybody have any large modded version I could use?
I want to look at an unit, building, or tech xml file.
 
To begin with, Dale's guide to the WBS file describes a lot of the parameters that a program should change. The hard part will be finding them all and doing it correctly. Here's the link: http://forums.civfanatics.com/showthread.php?t=135669

EDIT: BrentRichie's XML Tutorial found everything that needs to be changed in the XML. I'm leaving Dale's thread up here because it quite nicely describes everything that can be changed and why. BrentRichie's tutorial decribes how and where, and its likely our starting point (and quite amazing work too). I haven't posted it here because its rather long, but the links are in the following post.

And here's the relevant part for Civ's, showing what can all be changed.

Quoted From Dale's Thread:

Dale said:
BeginPlayer

CivDesc= the descriptive name to give the civ. This is the name that civ takes on in the game. EG: CivDesc=Kingdom of Ghent.

CivShortDesc= the short descriptive name to give the civ. This is the short name that civ is known as. EG: CivShortDesc=Ghent.

LeaderName= the name of the leader of that civ. This name is what the king or emporer or whoever is called. EG: LeaderName=Chief Two-Dogs.

CivAdjective= the descriptive name of the civ. This can be determined by completing this sentance: "I am <LeaderName> who leads the <CivDesc> which is populated by the <CivAdjective> people." EG: I am Chief Tow-Dogs who leads the Kingdom of Ghent which is populated by the Ghentese people.

FlagDecal= the DDS file of the civ's flag. These are defined in the folder ../Art/Interface/TeamColor/. EG: FlagDecal=Art/Interface/TeamColor/FlagDECAL_UK.dds

WhiteFlag= the setting which gives the civ's flag (what the units hold) a white background or the background of the colour of the civ. Valid settings are 1 (use white) or 0 (use civ's default colour).

LeaderType= the leader settings to use for this civ. These values are defined in CIV4LeaderHeadInfos.xml. EG: LeaderType=LEADER_ELIZABETH.

CivType= the civilization to use for this player. These values are defined in CIV4CivilizationInfos.xml. EG: CivType=CIVILIZATION_ENGLAND.

Team= the team number that this civ is part of. The team settings are defined in BeginTeam above in the WBS file. More than one civ can be part of a team, and every civ must be part of a team (even by itself). EG: Team=1

Handicap= the default handicap that the AI takes if no human takes this civ. These values are defined in CIV4HandicapInfo.xml. EG: Handicap=HANDICAP_NOBLE

Color= the default colour of the civ. The colour defines the civ's border colour, the colour of the name, etc. These values are defined in CIV4PlayerColorInfos.xml. EG: Color=PLAYERCOLOR_CYAN

ArtStyle= the style of art that the civ uses. This values defines building graphics and tile improvements. These values are defined in GlobalTypes.xml.

PlayableCiv= the setting to turn on whether this civ can be played by a human or not. Valid values are 0 (AI only) or 1 (playable by human).

MinorNationStatus= the setting to determine if a civ is a minor nation in relation to diplomacy. Valid values are 0 (full power civ) or 1 (minor nation civ that won't do diplomacy with anyone).

StartingGold= the amount of gold that civ starts with in the scenario.

StartingX= the X-axis location of the starting plot of this civ. Only valid if there are no cities on the map for this civ.

StartingY= the Y-axis location of the starting plot of this civ. Only valid if there are no cities on the map for this civ.

StateReligion= the State Religion that the civ starts the game with. These values are defined in CIV4ReligionInfo.xml.

StartingEra= the era that the civ begins the game in in regards to graphics. These values are defined in CIV4EraInfos.xml.

CivicOption=XXXX, Civic=YYYY where XXXX is the civic category and YYYY is the actual civic. This setting forces the civ to that civic at the start of the game. Civic options are defined in CIV4CivicOptionInfos.xml and civics are defined in CIV4CivicInfos.xml. EG: CivicOption=CIVICOPTION_GOVERNMENT, Civic=CIVIC_UNIVERSAL_SUFFRAGE

AttitudePlayer=XXX, AttitudeExtra=YYY where XXX is the player number affected and YYY is the amount to change diplomatic attitude towards that player. EG: AttitudePlayer=1, AttitudeExtra=-15 will change this civ's attitude towards player 1 by -15.

CityList= the name of cities that the civ has available when founding new cities. EG: CityList=Shanghai will cause this civ to use Shanghai as a city name. You can have as many pre-defined city names using CityList as you wish, each one on a seperate line. If these are left out the default city names are used.
 
Ok, so probably BrentRichie's XML tutorial is the place to start. He's pretty much identified everything in the XML that needs to be changed in order to create a new civ.

Part I
http://forums.civfanatics.com/showthread.php?t=135459

Part II here, which will fill out the info created in part I:
http://forums.civfanatics.com/showthread.php?t=135535

So essentially, we'll be taking everything thats modified in these files, and putting them into a step by step wizard that changes the files through a graphical user interface instead of XML.
 
The problem with a wizard is you probably will not be able to anticipate what many modders may wish to do. Greencard mentions adding this and adding that. What if a modder merely wishes to change the prereq of a building or unit? What if s/he merely wishes to change units stats?

I think it would be more productive to have something similar to the Civ III editor in which there were different tabs for different categories: Units, Technologies, Buildings, Terrain Improvements, Worker Actions, etc. The program would simply load all the relevant data from the xml files. The user would select different values by typing them in or use of a radial dial. Binary values (0 or 1) would be shown as "Yes" or "No" (e.g. Improvement must be next to a river. Yes/No). Other options would have drop-down menus. Others should have check boxes (e.g. Type of Bonus Resource Affected . . . ). Of course, there would be Add buttons in appropriate locations.

I understand such a thing requires a lot of programming, but this whole project requires a lot of work.

Thank you very much for you work, Vino.
 
I have a few arguments in response.

I was thinking of a wizard that would allow that. Obviously, each person wants to change something different, and someone may create a completely different unit, or just modify one a little bit. When i say wizard i mean taking someone through the process in a simple and easy way, asking several related questions per screen, and having someone click next, etc, until they're done. The point is not to make it hard, and the big idea is not to have anyone have to go into XML files to do it.

From what i gather, the problem you're supposing is that someone may just want to change one simple thing. This is partly solved by basing things on what already exists anyways. For instance, in the 'unit' wizard, it asks what unit you would like your unit to be based on. So if you click "warrior" from the drop down menu, it would fill in all the blanks (stength, MP, etc) so that if you wanted to change the strength from 2 to 3, you just change it. By basing each new unit on an exisiting one, people can just rename them, or they can slightly change them. Yes, they'll have to go through the wizard for each unit, but hey, if they want to do it quicker, they can mod the darn xml files themselves. I still say it'll be quicker to to it with a GUI.

As for tabs, I think i mentioned having a scenario editor. It will take a lot of work, and since I'm not the one programming this, i don't think i have the right to say we start out big. I say do each one, units, civs, whatever, as we can, and once one person gets tired, we pass it along. In the end, hopefully it'll all get done.
 
The scary thing is, if I knew EXACTLY what needs to be edited where in the xml files, I could create this thing in Excel. That's right, EXCEL.
 
WaxonWaxov said:
The scary thing is, if I knew EXACTLY what needs to be edited where in the xml files, I could create this thing in Excel. That's right, EXCEL.

You mean exactly what files need to be modified to change/add things to the game? I know Vbraun and Isak are separately working on mapping out all the xml tags. I'm sure that will help.
 
You are correct, Sir.

It would be even easier in MS Access, but I would do it in Excel because not everyone has Access.

All the xml files are is a data dump in a very specific format, which is easily replicated.

What would be PERFECT would be if someone saved the xml files as MS Word Docs with the variables highlighted.

Then give me about 8 hours of programming time...
 
Vino6 said:
wow!!! amazing greencardman!!!
[.....]
Are there any other JAVA programmers willing to help?
As soon as i can, i will upload the project and let you know how to download everything from it. That'll be for the sources. I think the releases should be done through this thread.

Wow, somehow I missed the second page of this topic :( Now we're going somewhere. I'm willing to help on the Java programming :)
 
Not sure if this will be of any use, but I'm currently compiling a quick reference of all the XML files.

It just gives a quick insight into what each file is for.

Its half finnished at present but should be finnished by Monday/Tuesday.

here's the thread for it anyway, you can make your mind up yourselves! :D

The project sounds good though, shame I cant program java or I'd help out aswell!

Good luck!
 
Top Bottom