Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: Total Campaign Generator 1.0

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Total Campaign Generator 1.0

    Total Campaign Generator 1.0
    App for windows

    This app generates random campaign maps (including terrain and regions) for Medieval II: Total War at the click of a button.

    Features

    • Random world generation
    • Generates multiple nations
    • Choose alliances and wealth
    • Map types: Inland, Coastal
    • Small or Large campaign worlds
    • Customize world terrain including rivers, hills and plains
    • Explored or unexplored world
    • Brief or long campaigns with many factions
    • Generate campaigns for Americas, Britannia, Crusades and Teutonic expansion campaigns
    • 5 climate types


    Download:
    http://sourceforge.net/projects/totalcampaigngenerator/



    Video and example map:

    https://www.youtube.com/watch?v=e_TCSWZdwoc




  2. #2

    Default Re: Total Campaign Generator 1.0

    A screenshot of the gui:


  3. #3
    The Holy Pilgrim's Avatar In Memory of Blackomur
    Citizen

    Join Date
    Feb 2009
    Location
    Someplace other than here
    Posts
    11,913

    Default Re: Total Campaign Generator 1.0

    This looks absolutely fantastic!

    Can it be modified to work with mods, or no? Also, how does it handle character attributes and traits?

    +rep, regardless

  4. #4

    Default Re: Total Campaign Generator 1.0

    Quote Originally Posted by The Holy Pilgrim View Post
    This looks absolutely fantastic!

    Can it be modified to work with mods, or no? Also, how does it handle character attributes and traits?

    +rep, regardless
    It generates a new campaign and uses the default campaign switch(in the .cfg)so that it temprorarily overwrites the default campaign for whatever mode your running (Americas, Crusades, etc). You'd have to move the campaign manually over to any additional mods folder. It will only use vanilla units, but if the mod overwrites them I suppose it could work.

    Characters are randomly generated, you get a random number of spies, diplomats and armies currently 1 princess. All chracters (including the faction leader) have random names assigned.

  5. #5

    Default Re: Total Campaign Generator 1.0

    The regions are divided up equally between factions, no rebel provinces at the moment.

  6. #6

    Default Re: Total Campaign Generator 1.0

    Hardest part was to divide the terrain up into regions and have random settlement locations. It was quite a coding challenge and took me 5 months.

  7. #7
    +Mr.Crow+'s Avatar VIVERE MILITARE EST
    Join Date
    Aug 2009
    Location
    Apulia, Kingdom of Sicily
    Posts
    1,359

    Default Re: Total Campaign Generator 1.0

    Hi mtwgamer0,

    your work is great!

    I'm a java programmer and i'm really interested in image elaborations and filters.

    I'm really interested to know something more about this:

    Quote Originally Posted by mtwgamer0 View Post
    Hardest part was to divide the terrain up into regions and have random settlement locations. It was quite a coding challenge and took me 5 months.
    Can i ask you to show how this part of your code works?

    Best Regards,
    +Mr.Crow+
    BELLUM CRUCIS 7.0 Co-Director
    PERSONAL PROJECTS: CSUR || WARWAGON

    Quote Originally Posted by Cyprian2 View Post
    As far as I'm concerned, you've done something that CA should have thought of a long time ago. You should be on their pay-roll!

  8. #8
    KEA's Avatar Senator
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    1,104

    Default Re: Total Campaign Generator 1.0

    Looks really good

  9. #9
    Frunk's Avatar Form Follows Function
    Artifex

    Join Date
    Jun 2009
    Location
    Gold Coast
    Posts
    6,507

    Default Re: Total Campaign Generator 1.0

    Great work! I'm keen to try it out sometime.

  10. #10
    +Mr.Crow+'s Avatar VIVERE MILITARE EST
    Join Date
    Aug 2009
    Location
    Apulia, Kingdom of Sicily
    Posts
    1,359

    Default Re: Total Campaign Generator 1.0

    Thx for your answer. I really appreciate it.

    I know voronoi and i've immediately supposed that you used it in your code.

    Which type of voronoi did you use? Manhattan or Minkovski?
    BELLUM CRUCIS 7.0 Co-Director
    PERSONAL PROJECTS: CSUR || WARWAGON

    Quote Originally Posted by Cyprian2 View Post
    As far as I'm concerned, you've done something that CA should have thought of a long time ago. You should be on their pay-roll!

  11. #11

    Default Re: Total Campaign Generator 1.0

    Method I used was to add multiple random points to a bitmap, assign each point a color. Then loop through every pixel in the bitmap and color it depending on which of those coloured points is nearest to the current pixel.

  12. #12
    +Mr.Crow+'s Avatar VIVERE MILITARE EST
    Join Date
    Aug 2009
    Location
    Apulia, Kingdom of Sicily
    Posts
    1,359

    Default Re: Total Campaign Generator 1.0

    Quote Originally Posted by mtwgamer0 View Post
    Method I used was to add multiple random points to a bitmap, assign each point a color. Then loop through every pixel in the bitmap and color it depending on which of those coloured points is nearest to the current pixel.
    This is the generic voronoi algorithm. My question is which type of voronoi did you use? In other words, I wish to know how you calculate pixel proximity.

    There are 3 most common used voronoi type: Euclidean, Manhattan and Minkowski.

    For example, let's take Medieval 2 map_height:

    Spoiler Alert, click show to read: 




    Using a java code made by me, i've create 199 random regions using all this 3 voronoi types.

    Euclidean:

    Spoiler Alert, click show to read: 




    Manhattan:

    Spoiler Alert, click show to read: 




    Minkowski:

    Spoiler Alert, click show to read: 




    As you can see, the last type (Minkowski) seems to be the better voronoi type to create Medieval 2 regions.

    All this 3 voronoi types work as you wrote. The only difference between them is the pixel proximity calculation. Calling the distance "d", this is how it's calculated:

    Euclidean: d = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));

    Manhattan: d = Math.abs(x1 - x2) + Math.abs(y1 - y2);

    Minkowski: d = Math.pow(Math.pow(Math.abs(x1 - x2), p) + Math.pow(Math.abs(y1 - y2), p), (1 / p));
    BELLUM CRUCIS 7.0 Co-Director
    PERSONAL PROJECTS: CSUR || WARWAGON

    Quote Originally Posted by Cyprian2 View Post
    As far as I'm concerned, you've done something that CA should have thought of a long time ago. You should be on their pay-roll!

  13. #13

    Default Re: Total Campaign Generator 1.0

    When programming I use the following function to calc distance:

    Code:
    //----------------------------------------------------------
    //
    //----------------------------------------------------------
    float distance(float x1, float y1, float z1, float x2, float y2, float z2)
    {
        return(sqrt (pow((float)(x2-x1),(float)2) + pow((float)(y2-y1), (float)2) + pow((float)(z2-z1), (float)2)));
    }

  14. #14
    +Mr.Crow+'s Avatar VIVERE MILITARE EST
    Join Date
    Aug 2009
    Location
    Apulia, Kingdom of Sicily
    Posts
    1,359

    Default Re: Total Campaign Generator 1.0

    If i'm not wrong, this is the Riemannian type, a 4th type of voronoi.

    I've just used it in my application and it seems to work even better then Minkowski type:

    Spoiler Alert, click show to read: 





    Good work mtwgamer0! And thx for your answers
    BELLUM CRUCIS 7.0 Co-Director
    PERSONAL PROJECTS: CSUR || WARWAGON

    Quote Originally Posted by Cyprian2 View Post
    As far as I'm concerned, you've done something that CA should have thought of a long time ago. You should be on their pay-roll!

  15. #15
    Hexdragon's Avatar Libertus
    Join Date
    Nov 2005
    Location
    South America / Peru / Lima City
    Posts
    81

    Default Re: Total Campaign Generator 1.0

    Great work
    +rep


    In order to allow people to find this tool more easily, I would suggest to move this thread to: Medieval II Mod Workshop - Tools, Tutorials, and Resources


    Also add to this index:
    http://www.twcenter.net/forums/showt...rces-amp-Tools






  16. #16

    Default Re: Total Campaign Generator 1.0

    The latest version is soon to be released.

    It currenty has the following features:

    -Optional forts
    -Merchants and map resources
    -Early period start (no units or development)



  17. #17

  18. #18

    Default Re: Total Campaign Generator 1.0

    oh... any chance for Rome Total war?
    this tool looks extreme awesome!

  19. #19

    Default Re: Total Campaign Generator 1.0

    Hi, does anybody have a copy of this tool?

    It seems that it's not available at sourceforge.net.

    I'd like to try it.

  20. #20
    Virian's Avatar Civis
    Join Date
    Aug 2018
    Location
    Romania
    Posts
    115

    Default Re: Total Campaign Generator 1.0

    Hi does anybody have a copy/ link of this? I'd like to try it out myself but all links are down.

Page 1 of 2 12 LastLast

Tags for this 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
  •