1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Civ4 XML editor projected

Discussion in 'Civ4 - Creation & Customization' started by Vino6, Nov 2, 2005.

  1. Vino6

    Vino6 Chieftain

    Joined:
    Nov 2, 2005
    Messages:
    6
    I am projecting to build an "XML editor" for CIV IV in Java..
    The idea is that all the files CAN be edited at once if we have the right tool. I mean, we could edit civilizations in one screen and then "magically" see how all the changes are done in every file that has to be changed (E.G. the civilizations file, the text file, the units file, etc..).

    I was thinking I could use some help in the following areas:

    *Understanding the different files, and the XML tags on them, the relations between them.

    *Building, if not shipped with the game (i am at work, i'll know this later), XML schemas, so it will be easier to build the xml parser for my program.

    *I could use some advices about how the User Interface should look.

    Well, if there's someone out there who want to help i'd really apreciate it. If not, well, it'll just take me a little longer to build this app.
     
  2. Merl

    Merl Chieftain

    Joined:
    Oct 30, 2005
    Messages:
    3
    I've been looking at doing the same thing in Python as that is what is native to the game. So far I've been looking at the XLM schemas and experimenting with Python's XML handling extensions. I haven't coded in Java and I've used Python, so if you'd like to do a Python version we could work together on it.
     
  3. Uty

    Uty I hate you, Milkman Dan

    Joined:
    Apr 13, 2005
    Messages:
    124
    Location:
    Newark, Delaware
    I'm not sure what kind of functionality you plan on adding. How would it be different from using an existing text editor such as vi?

    I was thinking about doing the exact opposite - let the user declare a few fields in some sort of a wizard and then have the program dynamically generate the XML. Some sort of merge utility would be necessary so you can pack multiple mods together. (It seems everyone is saying "replace the main files with my versions" which limits mods to 1)
     
  4. jedakiah

    jedakiah Chieftain

    Joined:
    Nov 2, 2005
    Messages:
    5
    I think this would be wonderful. In another game there was a program (Though those files were txt-based, not XML) and you could go into it, and logically edit files. Say you wanted to modify each units speed, it would have a drop down box with each unit in it and when you selected it, it would show that units settings. Far easier than going for 14,000 lines of code.
     
  5. GIDustin

    GIDustin Emperor

    Joined:
    Nov 11, 2001
    Messages:
    1,392
    Location:
    Spearfish, SD
    I also had plans of something similar to this for my website. You could select the units, leaders, world sizes, etc that you wanted, and then download a complete mod with everything you selected.

    Hardest part is finding a good XML parser with a Perl interface....
     
  6. Granias

    Granias Chieftain

    Joined:
    Nov 3, 2005
    Messages:
    34
    Location:
    The Netherlands
    I'm also interested in this. Could you be a bit more specific about the functionality you want to add?
     
  7. Vino6

    Vino6 Chieftain

    Joined:
    Nov 2, 2005
    Messages:
    6
    That's precisely why i was going on for Java, because it has so many tools. I have experience parsing XML in java (and i must say, if you know Java, it's almost trivial to do it with some free tools if you have the schemas defined) and I also have experience in user interface programming.
    i was thinking on something "like" the old Civ 2 editor that came with the game. A friendly user interface in wich you could choose the civ you want, or create a new one, then it'll show everything you can change, like the descriptions, adjectives, civilopedia, special units, cities...even flags.
    Then, supose you want to change the special unit, then it would show you all the currently created special units, and give you the possibility to create a new one, maibe from scracht or based on another unit (say, for example, you don't feel like creating all the art, so you can use the art of a unit for another one and edit it's capabilities) then when you'd save the civ, the civilizations, the text, and the units file would be updated.
    One of the best things of making this program in have would be it extensibility, i guess I can start just with some basic functionality (editing/creating civs only) and leave the program "open" for future upgrades.

    Speaking about the project itself, i was looking yesterday when i got home the amount of XMLs on wich the game is based. ****, i should have written this from home. I'll start creating the schemas tonight, i'll post which XMLs I need schemas of for the first phase of my project, and update which ones i have... if someone can help it'll be great. I'll keep you updated with everything.

    Phase 1 - Launched

    Objective:
    *System Design

    *User Interface general definitions

    *Civilization creation/modificacion:

    Edit the texts, initial techs, leaders (w/o creating new ones), special units (w/o creating new ones), cities, flag (w/o creating new ones?).
     
  8. Feet

    Feet Warlord

    Joined:
    Oct 25, 2005
    Messages:
    143
    Location:
    Southend, UK
    This sounds fantastic.
    I wish I could help but I really don't know XML (I'm learning though), Java or Python. So for someone like me this tool would be a god send.

    I'll be keeping an eye on your progress.
     
  9. Colonel Kraken

    Colonel Kraken Deity

    Joined:
    Dec 27, 2001
    Messages:
    2,453
    Location:
    Grand Rapids, MI
    That would be absolutely fantastic, Vino. Instead of bumbling through umpteen hundred lines of code, we could automatically select things in a friendly user interface.

    The key would be to know all files that must be modified to change certain things and have your program notify you as such. For example, modifying promotions users 3 different XML files: one for the data, one for the Civilopedia, and one for text definitions (or something like that).

    Thanks! :goodjob:
     
  10. Gramphos

    Gramphos Emperor

    Joined:
    Sep 1, 2001
    Messages:
    1,139
    Location:
    Sweden
    This is something I've been planning on doing in Python. But with my limited time I guess it's better that someone else does it instead. ;)
     
  11. Granias

    Granias Chieftain

    Joined:
    Nov 3, 2005
    Messages:
    34
    Location:
    The Netherlands
    This sounds great! :) I have experience with Java and parsing, not XML in particular. Not sure I can help you but I´m available and I´m certainly keeping my eye on this one ;)
     
  12. skadistic

    skadistic Caomhanach

    Joined:
    May 25, 2004
    Messages:
    15,239
    Location:
    Land of Mary
    sounds like a great idea. i for one have no experience in any thing but would like mod. learning all that stuff seem to be a daunting task. anything to make it easier will be happily aproved by dummies like me.
     
  13. Skippa

    Skippa Noble

    Joined:
    Nov 8, 2005
    Messages:
    65
    Location:
    PA
    This is a great idea. I have some experience in Java but none using XML. I'd like to help out if I could, but I may be 'below the curve' and only hold things back.
     
  14. Granias

    Granias Chieftain

    Joined:
    Nov 3, 2005
    Messages:
    34
    Location:
    The Netherlands
    Has there been any progress on this? Perhaps some jobs to do? I'm anxious to see this being realised :mischief:
     
  15. the100thballoon

    the100thballoon Emperor

    Joined:
    Aug 13, 2003
    Messages:
    1,239
    This would be incredibly helpful!
     
  16. Flamegrape

    Flamegrape Warlord

    Joined:
    Dec 20, 2002
    Messages:
    245
    Location:
    United States
    I would be glad to help with graphics of the user interface. Maybe after I see some sort of rough alpha or perhaps a design flowchart, I could be inspired.
     
  17. builderchad

    builderchad Chieftain

    Joined:
    May 11, 2005
    Messages:
    18
    For user interface Vino I would strongly recommend using SWT over AWT or Swing. SWT has native components for each platform so it is a lot faster than AWT/Swing and looks native to the platform it runs on. If you plan on using extremely complicated widgets, though, then Swing may save dev. time. You can build very complicated widgets in SWT and JFace but that would be more time consuming than using Swing (as the components are probably already available for Swing) and I am not sure on when you want to roll this out by.

    Anyway, just my 2gp :mischief:
     
  18. Criamon

    Criamon Chieftain

    Joined:
    Nov 9, 2005
    Messages:
    1
    Location:
    Darmstadt / Germany
    As I am currently doing a certification as software quality tester I would volunteer to do exactly that for the project. Maybe more - if time allows. But anyhow, testing means also working on the requirements and specifications...
    Just contact me by PN or mail!

    so long
    Criamon
     
  19. Civrules

    Civrules We the People

    Joined:
    Apr 6, 2003
    Messages:
    5,621
    Gender:
    Male
    Location:
    US
    Moderator Action: Moved to main C&C Forum.
     
  20. Aeon221

    Aeon221 Lord of the Cheese Helmet

    Joined:
    Apr 22, 2003
    Messages:
    1,900
    Location:
    Hiding from the Afro-Eurasians
    Tagged!

    For the love of SID! Post what you have done man! ;p
     

Share This Page