Announcement

Collapse
No announcement yet.

WIP: MGE to ToT to (eventually) Freeciv Converter/Editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • WIP: MGE to ToT to (eventually) Freeciv Converter/Editor

    I don't think I've posted this before. I've been working on a Converter/Editor for the rules.txt file in MGE and ToT. Some main points:

    A. It's been created using MS Excel 2003 and will probably work in most Excel-like programs like Google spreadsheet and MS Works spreadsheet.

    B. I built it in Excel because of the obvious benefits from using a spreadsheet program. Like Boco's tool, this workbook can be edited to significantly aid the scenario creator.

    How do I work it?

    EDIT: New instructions are included in the Converter.xls workbook. See below.

    Now, a note to the wise. I haven't tested this yet, but it sure looks pretty. Looks like I still need to add commas to the Output files.
    Last edited by Harry Tuttle; October 26, 2009, 12:14. Reason: New version of file

  • #2
    Very nice work HT

    I was coincidentally having a nose around the Freeciv wiki the other day, and this converter will definitely get me playing a game or two.

    Does this mean scenarios are now supported in Freeciv, or is it just generic civ2 rules files? Do they have events coding?
    http://sleague.apolyton.net/index.ph...ory:Civ2_Units

    Comment


    • #3
      Originally posted by fairline View Post
      Very nice work HT
      Does this mean scenarios are now supported in Freeciv, or is it just generic civ2 rules files? Do they have events coding?
      Scenarios, as we know them in MGE/ToT, have always been somewhat possible in Freeciv. Freeciv does have a generic rule set based on Civ2. You could always edit that. Plus the graphics can be switched out by hand.

      The big problem with Freeciv scenario development was the lack of a world/scenario editor and event scripting. Freeciv had a world editor in previous versions but it was not updated for later releases. Event scripting had not been implemented until recently.

      Version 2.2, which has not been released yet, is said to have world editor included in the actual game. What it can do is anyone's guess, but I imagine it will allow us to place cities and units like the cheat menu in Civ2 allows us to do.

      Event scripting, while still largely lacking easy to use controls, is possible. Go to the Freeciv web forum and look up Lua scripting. Apparently someone figured out how to make it work, at least for one distinct occurrence. It still involves a ton of coding however, and I for one am an accountant by trade, not a computer expert.

      So, the big question: Can Civ2 scenarios be ported over to Freeciv? Sort of. You can obviously copy the graphics over. You could always copy the rules.txt over if you had the patience to cut and paste everything into each individual file used by Freeciv. Future versions of my converter should be able to solve that problem. The end result? More of a scenario on a random map than a true scenario.

      Still worth looking into.

      Comment


      • #4
        Fixed part of the directions. In case you were wondering why you kept getting a capital A instead of "select all" it's because the commad should be ctrl + a, not shift + a.

        Also, another note. Looks like I'm pretty close to getting a good output file for TOT. I'll post an updated version in a few days or so.

        Comment


        • #5
          This is most interesting...!

          Does Freeciv handle events these days?
          http://sleague.apolyton.net/index.php?title=Home
          http://totalfear.blogspot.com/

          Comment


          • #6
            Sort of. I'll post the link to that Lua scripting thread. Should give us somw ideas.

            Comment


            • #7
              Here you go.

              Comment


              • #8
                New Iteration

                This new version (attached) is a proof of concept.

                If you follow the instructions (in the instruction tab within the file) you can:

                1. Import an MGE or ToT rules file, edit it, and export a basic ToT rules file. I haven't created the formulas necessary to import, edit, and export anything past CARAVAN in the ToT rules file as of yet.

                2. Create a new, basic ToT rules file. The original, generic rules information is already included in the workbook.

                I'm going to keep working on this until the MGE and ToT exports work in entirety. Future changes will include additional editing tools and the eventual inclusion of Freeciv export sheets. Critiques and criticism are welcome, as well as ideas for additional tools.

                EDIT: Removed file. See latest version.
                Last edited by Harry Tuttle; November 10, 2009, 01:21.

                Comment


                • #9
                  Newest Version

                  I've made a significant amount of progress on this. The major unfinished portions of the workbook are related to the multi-map and transport function of ToT.

                  I've checked the latest MGE & ToT outputs for errors and they seem to be OK. I have not gone through the trouble of testing yet, so use at your own risk.

                  As always, input is appreciated.
                  Attached Files

                  Comment


                  • #10
                    The first beta of Freeciv 2.2 is expected in early December, per Cazfi.



                    I believe that this version should have a world editor built-in, among some other things.

                    Comment


                    • #11
                      Just putting it out there, but does anyone care about this? I think there were 11 downloads between the three files that I posted. Do I need to explain more? How it could be used? Screenshots? I know it's not flashy stuff, but its got some good potential.

                      Comment


                      • #12
                        I downloaded the latest version, but I didn't have a clue how to operate it. It looked like an excel spreadsheet, but that's all. Are there instructions?
                        Tecumseh's Village, Home of Fine Civilization Scenarios

                        www.tecumseh.150m.com

                        Comment


                        • #13
                          Originally posted by techumseh View Post
                          I downloaded the latest version, but I didn't have a clue how to operate it. It looked like an excel spreadsheet, but that's all. Are there instructions?
                          There is an instruction spreadsheet tab for importing and exporting rules.txt files. It should be the first one in the workbook. By following those instructions you should be able to import from a rules.txt file, into the excel file, and export into a rules.txt file.

                          As for the actual operation, I guess I should put something in the file itself.

                          Here's the idea:

                          Basic Info: MS Excel is part of the MS Office suite of programs. It's a spreadsheet program. Some basic terminology: a file with an .xls extension is termed a "workbook". A workbook contains "spreadsheets". Each spreadsheet has a tab, located at the bottom of the window, for easy navigating. Each spreadsheet is made up of columns (A,B,C...) and rows (1,2,3...). Each column or row has "cells" (A1, D3, Z37...) which is where the information is stored. Each cell can be edited. Excel has a text wizard that one can use to import text files and drop them into the columns and rows of a spreadsheet. Excel supports "formulas" which can be anything from basic match equations (addition), to logic equations, to text editing (combine words, etc...)

                          1. The converter workbook I've posted can be used in at least three ways.
                          • A. Import an MGE rules.txt file and export an edited MGE or ToT rules.txt file.
                          • B. Import a ToT rules.txt file and export an edited MGE or ToT rules.txt file.
                          • C. Create an MGE or ToT rules.txt file from scratch.


                          2. The workbook is split up into a number of spreadsheets, each with its own tab located near the bottom of the screen.
                          • - Instructions - Import/Export of rules.txt files
                          • - MGE Input - The spreadsheet where you will import your original MGE rules.txt file.
                          • - MGE Output - The spreadsheet from which you will export you edited MGE rules.txt file.
                          • - ToT Input - The spreadsheet where you will import your original ToT rules.txt file.
                          • - ToT Output - The spreadsheet from which you will export you edited ToT rules.txt file.
                          • - Control - This identifies from which rules.txt version you want to pull information from to edit. I have already included the vanilla MGE and ToT rules.txt files in with the respective input spreadsheets.
                          • - Assorted Edit Sheets corresponding to each major component of rules.txt (COSMIC, UNITS, etc...) - The edit sheets are where you will edit the information pulled in from the input sheets.


                          3. On each edit sheet there are two basic groups: Original information and Edited information. The Original group pulls in information from either the MGE Input or ToT input sheets, dependent on what choice you made on the control sheet. The Edited group is identical to the Original group, in that the information is the same. Though, unlike the Original group the Edited group should pull information directly from the Original group cells. If you want to edit some information, such as a unit name, terrain stats, unit sound, etc... just click on a cell in the Edited group and make a change. Both groups were included so that a user could see what changes he/she has made.

                          4. The MGE Output and ToT Output sheets will pull information from the Edited group of each Edit spreadsheet. You can see exactly what will be included on the rules.txt file after export by just looking at the output sheet.

                          5. See the current instruction tab for how to export the information you just edited.

                          Get the idea yet?

                          Comment


                          • #14
                            Originally posted by Harry Tuttle View Post
                            Just putting it out there, but does anyone care about this? I think there were 11 downloads between the three files that I posted. Do I need to explain more? How it could be used? Screenshots? I know it's not flashy stuff, but its got some good potential.
                            Yes! I'm in the process of converting multiple FW rules files to ToT format for Komnenai, so I'll give your spreadsheet a whirl rather than the scotto converter.

                            Keep up the good work Bill
                            http://sleague.apolyton.net/index.ph...ory:Civ2_Units

                            Comment


                            • #15
                              Originally posted by Harry Tuttle View Post
                              Thanks, Harry - Checking it out that forum...
                              http://sleague.apolyton.net/index.php?title=Home
                              http://totalfear.blogspot.com/

                              Comment

                              Working...
                              X