Results 1 to 6 of 6

Thread: Shogun 2 scripting information and documentation.

  1. #1

    Default Shogun 2 scripting information and documentation.

    Hi all,
    Those of you looking to get into scripting for Shogun 2 will find this information very interesting. I'll start another script-o-rama later, depending on how much interest there is for one. If there isn't much demand I'll just wait until I get my hands on the full game.
    What this is is a list of all new Lua functions and tables in Shogun 2 (basically all new conditions, events, effects and Campaign UI entries). It was generated using getfenv() and is a very promising list. If the full game has any more scripting commands introduced after this we'll be singing, but it's not likely. This list contains stuff we could only have dreamed about doing in ETW/NTW, so I'm quite excited about it's possibilities!

    Conditions:
    Click to view content: 

    New in Shogun 2 demo:

    Click to view content: 
    AnyFactionDestroyedLastTurn
    CampaignNumberOfUnitsInEnemyAlliance
    CampaignNumberOfUnitsInEnemyArmy
    CampaignNumberOfUnitsInPlayerAlliance
    CampaignNumberOfUnitsInPlayerArmy
    CharacterFactionReligion
    CharacterIsFemale
    CharacterOlderThan
    CharacterRank
    CharacterWifeHasTrait
    FactionBuildingUnderConstruction
    FactionKeyIsLocal
    ForcesComposedOf
    GarrisonIsLocal
    GarrisonUnitCount
    GovernorshipsTaxLevel
    IsAdmiral
    IsDaimyo
    IsFamilyMember
    IsNightBattle
    MapPositionNear
    RegionIsLocal
    RegionIsRebelling
    RegionMajorityReligion
    RegionName


    Old stuff from NTW not in use anymore:
    Click to view content: 

    FactionTradeCommodityExists
    IsGuerrillaGeneral
    RegionHasUnexportedTrade
    SettlementOwnedBy


    Events:
    Click to view content: 

    New in Shogun 2 demo:

    Click to view content: 
    AreaCameraEntered
    AreaEntered
    ArmyBribeAttemptCriticalSuccess
    ArmyBribeAttemptFailure
    ArmySabotageAttemptCriticalSuccess
    ArmySabotageAttemptFailure
    AssassinationAttemptCriticalSuccess
    AssassinationAttemptFailure
    CampaignCoastalAssaultOnCharacter
    CampaignCoastalAssaultOnGarrison
    CampaignEffectsBundleAwarded
    CharacterBecomesDaimyo
    CharacterComesOfAge
    CharacterLeavesGarrison
    CharacterMarriage
    CharacterPerformsActionAgainstFriendlyTarget
    CharacterRankUp
    CharacterRankUpNeedsAncillary
    CharacterRelativeKilled
    CharacterSuccessfulArmyBribe
    CharacterSuccessfulConvert
    CharacterSuccessfulDemoralise
    CharacterSuccessfulHuntDown
    CharacterSuccessfulInciteRevolt
    CharacterSuccessfullyBribesGarrison
    CharacterSurvivesAssassinationAttempt
    CharacterWoundedInAssassinationAttempt
    ClanBecomesVassal
    ComponentCreated
    ComponentMouseOn
    ComponentMoved
    ConversionAttemptCriticalSuccess
    ConvertAttemptFailure
    DaimyoDeclaresWar
    DaimyoSignsPeaceTreaty
    DemoraliseAttemptCriticalSuccess
    DemoraliseAttemptFailure
    EncylopediaEntryRequested
    FactionAboutToEndTurn
    FactionBecomesLiberationProtectorate
    FactionBecomesShogun
    FactionBeginTurnPhaseNormal
    FactionCapturesKyoto
    HuntDownAttemptCriticalSuccess
    HuntDownAttemptFailure
    InciteRevoltAttemptCriticalSuccess
    InciteRevoltAttemptFailure
    MapIconMoved
    PendingBattle
    RegionSelected
    SabotageAttemptCriticalSuccess
    SabotageAttemptFailure
    ScriptedAgentCreated
    ScriptedAgentCreationFailed
    ScriptedCharacterUnhidden
    ScriptedCharacterUnhiddenFailed
    ScriptedForceCreated
    ShortcutTriggered
    SpyingAttemptCriticalSuccess
    SpyingAttemptFailure
    StartRegionPopupVisible
    StartRegionSelected
    TradeNodeConnected


    Old stuff from NTW not in use anymore:
    Click to view content: 
    HarassmentAttemptSuccess



    Effects:
    Click to view content: 

    New in Shogun 2 demo:

    Click to view content: 
    add_character_experience
    OpenBrowser


    Old stuff from NTW not in use anymore:
    Click to view content: 
    n/a



    Game:
    Click to view content: 

    New in Shogun 2 demo:

    Click to view content: 
    add_circle_area_trigger
    add_outline_area_trigger
    allow_player_to_embark_navies
    apply_effect_bundle
    attack
    autosave_at_next_opportunity
    create_agent
    create_force
    disable_end_turn
    disable_shortcut
    dismiss_advice
    dismiss_advice_at_end_turn
    force_agent_action_success_for_human
    force_change_cai_faction_personality
    hide_character
    instant_set_building_health_percent
    instantly_dismantle_building
    instantly_repair_building
    kill_character
    load_named_value
    lock_technology
    make_neighbouring_regions_visible_in_shroud
    make_son_come_of_age
    modify_next_autoresolve_battle
    override_ui
    pending_auto_show_messages
    remove_area_trigger
    replenish_action_points
    restore_shroud_from_snapshot
    scroll_camera
    scroll_camera_with_direction
    set_character_experience_disabled
    set_character_skill_tier_limit
    set_event_generation_enabled
    set_general_offered_dilemma_permitted
    set_ignore_end_of_turn_public_order
    set_tax_disabled
    trigger_custom_dilemma
    unhide_character
    win_next_autoresolve_battle
    zero_action_points


    Old stuff from NTW not in use anymore:
    Click to view content: 
    other_income_mod


    Campaign UI:
    Click to view content: 

    New in Shogun 2 demo:

    Click to view content: 
    AddOrRefreshButtonTimer
    add_ping_icon
    AgentOptionsClosed
    BribeArmy
    ButtonTimeRemaining
    CurrentTabTypename
    DemoraliseArmy
    HuntDown
    InciteRevolt
    HasNextItem
    HighlightComponent
    highlight_character
    highlight_position
    highlight_settlement
    IsHighlightComponent
    IsPreBattleTypeSiege
    MoveIntoArmy
    MoveIntoSettlement
    NumberOfAllies
    OpenBuildingEncyclopaediaEntry
    OpenInfoPanel
    OpenUnitEncyclopaediaEntry
    QuickDeclareWar
    RegionInfoDisabled
    remove_ping_icon
    ResetInfoPanelCountdown
    TheatreMapDimensionsBL
    StartInfoPanelCountdown
    unhighlight_character
    unhighlight_position
    unhighlight_settlement


    Old stuff from NTW not in use anymore:
    Click to view content: 
    CancelStealing
    CancelUpgradeFort
    CanHostDropin
    DemolishFort
    GentlemanStealing
    MonarchyInfo
    NextAutoSettlementSelection
    NextExportTradeProblem
    NextSupplyTradeProblem
    RepairFort
    RetrieveFactionListForDiplomacy
    UniversityResearching
    UpdateRadarView
    UpgradeFort
    Last edited by T.C.; February 25, 2011 at 10:04 AM.
    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

  2. #2

    Default Re: Shogun 2 scripting information and documentation.

    Hi All !

    I need som help for my text editing works. I trying som new battle creating /for mods/
    but after editing " sekigahara_battle" text file, i got this screen:
    Maybe my XP use another coding as SH2 ? When i work with notepad++ , this situation also happened.... Any instruction?

  3. #3

    Default Re: Shogun 2 scripting information and documentation.

    Thanks a lot!
    Is it possible to modify (add and/or remove) an art (tech) via script?

  4. #4

    Default Re: Shogun 2 scripting information and documentation.

    where can i change the date

  5. #5

    Default Re: Shogun 2 scripting information and documentation.

    Quote Originally Posted by Gi@nnis View Post
    Thanks a lot!
    Is it possible to modify (add and/or remove) an art (tech) via script?
    That's done via the db, not scripted

    Quote Originally Posted by denis.mile View Post
    where can i change the date
    Note here.
    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

    Default Re: Shogun 2 scripting information and documentation.

    This is so crazy helpful,

    I will be trying to force a bribe with :
    force_agent_action_success_for_human

    or BribeArmy

Posting Permissions

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