Results 1 to 10 of 10

Thread: Integration of TeD maps with single player campaign

  1. #1
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,704

    Default Integration of TeD maps with single player campaign

    Ok, I think there's no "official" thread about this, to post outgoing discoveries (if any) on how integrate TeD maps with the single player campaign of Shogun Total War 2.
    I would start digging into this as soon as I'm able to do it, not tonight for sure, but maybe tomorrow.
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  2. #2
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Integration of TeD maps with single player campaign

    Almost certainly your best bet would be to pack them like a standard custom map then use scripting to add them
    This would hopefully work.
    Code:
    local function OnNewCampaignStarted()
    	new_game = true
    	scripting.game_interface:add_custom_battlefield(-131.1, -133.1, 3, "battlelocation")
    end
    Pretty sure the format here is x,y, radius

    If you want to find out the coordinates the best bet would be to grab them from campaigns_maps/campaign_name/template_map.xml.

  3. #3
    MathiasOfAthens's Avatar Comes Rei Militaris
    Join Date
    Nov 2006
    Location
    Stockholm, Sverige
    Posts
    22,877

    Default Re: Integration of TeD maps with single player campaign

    Does that script link it to a city at those coordinates The Hedge Knight?

  4. #4
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Integration of TeD maps with single player campaign

    No idea whats at those coordinates tbh, they are the location of the custom battle used in the tutorial.

  5. #5

    Default Re: Integration of TeD maps with single player campaign

    That script might not work in every scripting file, particulary ones with no event callback for OnNewCampaignStarted. A far safer version would be as follows:

    Code:
    events.NewCampaignStarted[#events.NewCampaignStarted+1] = function(context)
    	scripting.game_interface:add_custom_battlefield(-131.1, -133.1, 3, "battlelocation")
    end
    Note that most files will have the relevant callback, but it's still far safer to use the above example (in case you overwrite something by mistake, which could happen with duplicate functions).

    Would be great to see this put to use for custom sieges in every city
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  6. #6
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: Integration of TeD maps with single player campaign

    I was rather imagining people would just use the campaign script but fair point!

  7. #7

    Default Re: Integration of TeD maps with single player campaign

    Quote Originally Posted by The Hedge Knight View Post
    I was rather imagining people would just use the campaign script but fair point!
    Even so, if they're not careful (ie just lob that code randomly into the file) my version will do less damage than yours. Just a little
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  8. #8
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Integration of TeD maps with single player campaign

    That scripting doesn't do what you think (want) it to do.

    See it's usage in the scripting.lua of the tutorial campaign. [Those battles that have random armies nomatter your army in the campaign]

    It links to (has to link to) a battle with preset armies and the result and the forces in the battle have no bearing to the campaign itself.

    Sorry, was planning to use this waaaaay back when I was making mods for the demo, and was disappointed in its function too.

  9. #9
    Lord Baal's Avatar Praefectus
    Join Date
    Apr 2011
    Location
    Republica de Venezuela
    Posts
    6,704

    Default Re: Integration of TeD maps with single player campaign

    So, it's impossibruu??
    PROUD TO BE A PESANT. And for the dimwitted, I know how to spell peasant. <== This blue things are links, you click them and magical things (like not ending up like a fool) happens.
    Visit my utterly wall of doom here.
    Do you wanna play SS 6.4 and take your time while at it? Play with my 12 turns per year here.
    Y también quieres jugar Stainless Steel 100% en español? Mira por aca.

  10. #10

    Default Re: Integration of TeD maps with single player campaign

    I didn't find a way to integrate them but I did find a way to access the siegemap files themselves for editing...

Posting Permissions

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