+ Reply to Thread
Results 1 to 9 of 9

Thread: Campaign Editor

  1. #1

    Campaign Editor

    Is it possible to create/edit units in the game? I would like to create some new hero units, with different perks than any that are currently available. Also, I would like to change the HP and unit totals from some of the current units (which, again, would be making a new unit). Anybody know how to do this?

  2. #2
    the Conqueror Peter Ebbesen's Avatar
    Hoi2 Beta MemberEU3 Collectors Edition OwnerNapoleonic MarshalEuropa Universalis: RomeEuropa Universalis III: In Nomine
    Rome: Vae VictisMajesty 2Victoria 2 BetaMount & Blade: WarbandVictoria 2
    LionheartCrusader Kings IISword of the Stars IIKing Arthur IIWarlock: Master of the Arcane
    Impire

    Join Date
    Mar 2001
    Location
    Beyond the infinite
    Posts
    13,788
    Make a save copy of /data/gamedata/units - and start modifying the xml files.

    I don't know how much is possible to change, but it does look fairly approachable and something that will bow down to somebody with dedication.

    Units are defined by type in types.xml where they are connected with a perkstable from unitperks.xml and have a list of starting perks. defined their starting perks

    E.g. flame_wardens are connected to table_perks_HardBlocker_KVA, but so is the thunder_warden which has perk_DefenceRound as start. Their unitclass (heavy inf, light inf &etc) is one of those from unitclasses.cvs

    table_perks_HardBlocker_KVA in unitperks.xml defines which perks or spells the unit can pick at each level.

    and so on and so forth. when you start looking at bit closer at perks and spells, you'll notice the use of a simple statebased system of effects under /effects/ and how perks like e.g. armour, counterattacks, &etc under /scripts/ (all under /data/gamedata/) - it ought to be possible to add stuff here too.

    Localized text strings can be found in /datatools/mapeditor2/locdata/game.md

    ....So all taken together, I guess my answer is "no, I don't know the answer on how to do this or whether it can be done, but I do have some pretty good guesses at how to attack the problem if I ever get bored enough to try, so if you are already thinking of doing something like this, go hit stuff for me."

    As always the cardinal rule is to make sure to have a handy backup of all the files you are editing.
    Finally got around to writing a list of my AARs in the inkwell.
    For those interested in Dominions 3 (SP or MP), there is an introduction thread to Dom3 in this thread run by Jarkko.
    Currently slowly writing Born to Breed: The Estridsen Lectures, a Crusader Kings 2 AAR of the upmost seriousness. Last updated June 29th, chapter09.

    Recently wrote an Endless Space Guide for 4X Veterans, which might be useful to people new to the game.

  3. #3
    Thanks. I'll have a look at that. What I was wanting to do was going to involve keeping the old units as well, however. So in other words, I could create a "special" unit of spears that have 15 troops instead of 10, and use a different perk tree, while having most of the spear units stay the same. I think if I followed the approach you described, it might be doable but would probably be beyond my programming capabilities (not saying I won't give a shot though ).

    Edit: I have been trying to edit the xml's, but the default "xml editor" isn't able to open them, what program did you use?
    Last edited by Rapsynrev; 19-04-2009 at 21:18.

  4. #4
    Recruit

    Join Date
    Apr 2009
    Location
    Kankakee, IL , USA
    Posts
    6
    Have you tried using wordpad or notepad? Civilizations uses xml files also and that is how I edit them, much easier than normal XML editors. Not sure about EL XML files I just installed it last night and haven't even gotten to play yet let alone play around.

  5. #5
    The types.xml file is binary encoded, Starts with txml binv2.0 so it look like some sort of xml to binary converter of version 2.0 has been used to make them.
    Tried to google it but found no quick link to any converter.
    Anybody has an idea?

  6. #6
    Yes, I did try using wordpad (that was my second guess too). Glad to see other people trying there hand at it, since I'm not much of a coder, and it would probably take me awhile to figure it out. I was able to open a few of them in excel actually, but most of the changes I made would effect the game globally, and not just one map (ie, if I want to make every unit only able to move one hex per turn I can change the move cost, but it effects every map, not just one).

    I still think the best solution would be a nice UI editor like they had in WC3, but I can imagine that would take a lot of work for them to add to for a future patch.

  7. #7
    Recruit

    Join Date
    Apr 2009
    Location
    Kankakee, IL , USA
    Posts
    6
    Maybe the community can provide that if we can get a decompiler/compiler for those that are encrypted. I had such a program for another game once... but can't seem to find it...

  8. #8

  9. #9
    Hmm, just looked there, but unfortunately I only read english well, and a little german, so I wasn't quite sure what was going on in that website. Would you mind posting a more direct link to the unpacking tool you specified?

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts