Beyond the Sword Editor

How can I look at and edit the code for the export buttons? I would like to try and make some changes if thats ok.

Go into Tools -> Macro -> Visual Basic Editor
 
http://www.openoffice995.com/

For those who don't have Excel, here's a free version, with an optional pay version. Far cheaper.

Unfrotauntly although that is a free spreadsheet program it doesnt support Visual Basic, which is what all the macros are in. So it won't do you much good.
 
I am currently working on adding and import functionality as well as adding more xml files that it works with. I am hoping to be finished sometime next week(would have been finished this week but I keep getting distracted with playing BtS instead:mischief: )

I was wondering... have you made any progress on that? I haven't been around in a while.
 
Hey Kael, I'm not able to access the drop down lists in your program. I hope that isn't related to the following. . .

I've noticed I get error messages when I use your program as is. I'm having to add in manually a <Building Extra Yield> </Building Extra Yield> subcategory when dealing with building yields. I assume this will be the case for similar things (commerce etc.)

More importantly, once I've dodged that error message (and perhaps because I dodged that error message) I'm getting an irritating "Tag :1 in Info class was incorrect. Current XML file is xml\Events/Civ4EventInfos.xml" Translation?

Needless to say, to someone who is nearly xml illiterate, this message didn't help me one bit. I mean, I understand that something is probably listed as "NONE" or "0" where it should be the other or something that is blank that should be one of those two. . . but my files look just like the ones used in the unmodded game. Please help, I'm trying to do such simple stuff and I'm SO CLOSE!

It is clear that you've gone through a lot of trouble thus far with this program; thanks. :)
 
From the looks of your spreadsheet here, Kael, I'd say it is something fantastic. However, I have no clue how to use it or what I can personally do with it - I am totally inept when it comes to computer programming. I don't know the first things about XML, Python, C++, Visual Basic, or anything else. It's like reading Swahili, to tell you the truth.

Anyway, I can kind of make out what some of these things refer to. However, all I'd like to do at this point is change the amount of food required to feed one person in my cities. After having scoured as many online resources as I could come up with, I still have no clue. (I looked in the Assets folder and tried to figure out which XML file has what I need to change. I can't even do that.)

I remember the Civ 3 Map Editor very fondly: I went to the "General Settings" tab and then changed the "Food Consumption/Citizen" field from 2 to 1. Even then, on my first time, I had to click on that nice "Help" button in the bottom corner to assist me.

For Civ 4, I have no clue what I am doing to alter something so simple as that. Very frustrating, and I really do appreciate guys like you that try to help others.

Is there something you can provide for a person who is totally, 100%, completely illiterate in terms of programming code? Something like the Civ 3 Editor? I have Excel, and I can follow directions pretty well. But trying to figure this out on my own... I might as well start reading a Russian Bible - it all looks the same to me.

I hope you will consider that. Thanks.


Kevin
 
I can help you with this. The editor has an option in the "Global Defines" called: "Food_Consumption_per_Population." It is currently set at 2. Change it to 1, and your mod will now have 1 food required per population point, etc.

Is that all you needed?
 
Yes, that was certainly helpful, DDrekins. However, if I may quote from our beloved Civ 4: "Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime."

It would be great to understand this spreadsheet in its totality, or have it dumbed down for folks like me who know nothing about XML.

Just a friendly request. But I thank you again.
 
I have an idea. I'm going to write up a detailed explanation on how to use this spreadsheet. The beauty of having me, someone without XML knowledge (although NotPron skills come in handy. . . look it up if you don't know what I'm talking about) write about this is that I'm certain to make painful mistakes.

If I write enough misinformation, eventually Kael will have to arrive to correct me. At that point we will have gotten his attention at last and all will be well in the world.

But seriously, I'm going to edit this post with the first of a bit of basic information on how to use this editor.

EDIT:

Alright, time for the first installment of my award winning post series: "How to Use Kael's Editor without Kael (or any knowledge of XML)"

Post #1: Setting up the Editor and tidbits of information on each tab

Kael's editor will give you a chance to bypass the raw XML coding by entering in data you wish to edit into a spreadsheet instead. You simply enter information into a tab that you wish to use, click the export button, and you've got an XML file formatted nicely with all of your information intact.

You will need to put the editor in its proper location for the files to be written to the correct locations, however. Go to the folder you installed Civ4 in, it is probably in Program Files --> Firaxis Games --> Civ4. From there you'll need to enter the BTS folder. From there you'll want to enter the "Mods" folder and then enter the folder of your particular mod (if you don't have one yet, create a folder with the name of a mod you'd like to start.) This is the proper location to keep the editor. From here it will write the files of your mod to their proper locations.

Next you will need to set up the folders the files will be written to. Within your mod folder you will need a folder called "Assets". Within that folder, you'll need a folder called "XML". From there you'll need several folders; it'll depend on what you plan to edit as to how many folders you'll need, but you might as well just create them all. The following are the folders you should create in your XML folder:

1. "Technologies" (No quotes)
2. "Text"
3. "GameInfo"
4. "Terrain"
5. "Events"
6. "Art"
7. "Civilizations"
8. "Units"
9. "Buildings"

Once you've created those, and placed the editor in its proper folder, when you edit something in the editor and then click the "Export" button in the upper left corner (you'll have to click it once per tab you wish to export) the editor will do all the busywork for you and spit out the files in their proper places.

So, once again the location of these folders is likely to be:
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\(Your Mod Name*)\Assets\XML\(All of those folders)
*This is where you'll put the editor.

Okay, now for a very brief overview on what each tab at the bottom of the spreadsheet is capable of.
Global Defines: This is where you can set a variety of variables that will affect nearly everything in the game. This tab saves directly to the XML folder, not one of the subfolders you should have created in the XML folder.
Bonus: Here you can create the bonus features on the plots of ground/water. This would be where you create or edit Ivory or Wheat.
Buildings: This will allow you to create your own building(s) with a whole lot of detail. All of the properties of wonders and standard buildings alike seem to be here.
Civics: Here you are allowed to create your own civics.
Civilizations: I don't believe I know how this one works. It seems to be set up for another mod. . .
Diplomacy: This also is set up for another mod and I don't believe it can work for editing. . .
Events: While I am trying to get this to work, I think it is mostly functional. This is where you can create the "random" events that pop up in BTS. This is one half of them anyway; the actual effects of the events are created here.
Event Triggers: This is where you can create the causes for the "random" events. They serve no purpose unless used in conjunction with the Events tab.
Handicap: This allows you to virtually create your own difficulty levels. All of the modifiers for easier settings can be adjusted here as well as those for harder settings.
Improvements: It seems you can create your own worker created improvements. The specifics of building a cottage, for example, would be dealt with here.
Leaders: This appears to be functional for another mod and isn't set up for editing BTS.
Promotions: While there is some modification that is set up for another mod, this is still very usable for editing the level-ups your troops can gain.
Technologies: Stuff regarding how custom technologies function resides here.
Text: Text messages used in the game are neatly contained here and has support for multiple languages. You'll need this for events to function, among other things.
Units: Very very detailed information can be edited here for your own custom units.
Unit Art: I only assume something can be done to make your own custom art for units here but I don't know how it functions at all.
Editor Defines: I'll need some help here, I'm not sure how this tab works.
 
I am currently in the process of improving this editor. Now, I don't know any XML, but there are some small mistakes I can detect in the XML that make the events not always function as they should. It'll take me a little bit longer to get this to work. I really love how neat Kael has made all of his coding though, it is so nice to work with. :)
 
Has anyone got this with the default vanilla data already in there?

I feel more comfortable beginning from there.
 
I don't have the knowledge of how to import the data and entering that stuff by hand. . . well. . . that'd take a LONG time. Also, I'm not sure how Vanilla friendly this is. It WAS designed for BTS after all. . .

On a related note, how do I upload files onto these forums? I have the event editor bugs worked out.
 
My mistake, I meant BTS' default data. Not the vanilla vanilla of Civ.

I would enter most by hand myself it's just that there are some pages in the spreadsheet which are blank enough for me to not know what goes where.

As for uploading, see the red button among the other optional tags? Use that for quick uploading.
 
I'm not sure what you mean by pages blank enough to not know where to put things. Could you explain maybe? I might be able to help you with that, but we should make sure we enter in all of the data to the most perfect version of this editor we can create. It'd be a pain to have an old version with all of the BTS data in it and a new version without any data in it and have to reenter it all.

Would people be interested if I posted up modified versions of this editor? I mean, it is kinda Kael's so it seems weird to update it without his say-so. I think I could also add other file types (so you could customize other aspects of the game.) Any takers? If so, I'll start clearing out all of the custom data on mine and keep just the changes I made to the visual basic code.
 
Knowing Kael, he won't mind.

Just mark original credit to him for making the thing and then credit yourself for the modifcations you made. :)


Maybe it's because I haven't had a good look at the actual xml details but there are some complete blank columns and it's unnerving to set off with that. Especially creating from scratch anyway. It's probably just a personal thing but I feel comfortable editting an existing set up because I an straight away see the connections. I suppose it's some entry fields I'm not sure what to put in them but when I see it with data already put in I can instantly understand what it means and what the value assigned to it means too.

If you have a modified editor that fixes some issues with the old one, upload it and then we can together plug in original BTS data. :)
 
These forums won't let me upload an .xml file. Any ideas on where I can do this (and then link it from there?)
 
Alright, I hope that worked.

I have modified only the Events tab. . . and maybe the EventTrigger and Text tabs but I can't really remember. I'm calling this version 1.1 because I'm calling Kael's original 1.0 and any future updates will be +0.1 or +1.0 or whatever.
 

Attachments

Alright, I hope that worked.

I have modified only the Events tab. . . and maybe the EventTrigger and Text tabs but I can't really remember. I'm calling this version 1.1 because I'm calling Kael's original 1.0 and any future updates will be +0.1 or +1.0 or whatever.

Very cool. I added a link to your updated spreadsheet in the first post so more people can find it. If you would like (and your planning on continuing to develop it) your more than welcome to start your own thread and I'll lock this thread and link to yours so folks can get an updated version.

Whichever you prefer is fine with me. I was hoping someone who pick this up as I think it could be a great tool, I just dont have time to devleop it and work on FfH at the same time. Feel free to PM me if there is anything I can do, I don't check this forum very frequently.
 
Back
Top Bottom