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

Thread: An interesting idea

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    MaradoX-'s Avatar Libertus
    Join Date
    Mar 2009
    Location
    Belgium
    Posts
    55

    Default An interesting idea

    Well, this is an idea. I don't know yet how to do it, thats why I'm making this thread.

    Its like this:

    Whenever you win/lose a battle the result could be sent to a server where all result are kept. Like this, you can review your battles and maybe balance your army's. Or think of new strategy's etc etc...

    But here's my question, does anybody knows if it is possible to send with a mod data to a server on the internet? And does somebody knows where the file is that renders the victory/defeat screen?


    With kind regards,
    Divide and conquer...

  2. #2

    Default Re: An interesting idea

    Hi, im working currently on something quit simmilar.

    Its just a log for me, basicly saves all information it can get in a log file. I do that for campain informations for me, but it should not be that different for battles.

    Exept that i did not found the conditions.* variables for battle stats yet.

    And i dont think its a big problem to send this to a server.....

  3. #3
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: An interesting idea

    Quote Originally Posted by Steinig View Post
    Hi, im working currently on something quit simmilar.

    Its just a log for me, basicly saves all information it can get in a log file. I do that for campain informations for me, but it should not be that different for battles.

    Exept that i did not found the conditions.* variables for battle stats yet.

    And i dont think its a big problem to send this to a server.....
    Could you post your script? I think it might be helpful

    As for battles, there seem to be many different conditions that are active during battles, no idea if the campaign script is paused then or not:

    BattleAllianceIsAttacker
    BattleAllianceIsPlayers
    BattleAllianceNumberOfShips
    BattleAllianceNumberOfUnits
    BattleEnemyAlliancePercentageCanHide
    BattleEnemyAlliancePercentageOfClassAndCategory
    BattleEnemyAlliancePercentageOfMountType
    BattleEnemyAlliancePercentageOfSpecialAbility
    BattleEnemyAlliancePercentageOfUnitCategory
    BattleEnemyAlliancePercentageOfUnitClass
    BattleEnemyDirectionOfMeleeAttack
    BattleEnemyHasMissileSuperiority
    BattleEnemyShipActionStatus
    BattleEnemyShipOnFire
    BattleEnemyUnitActionStatus
    BattleEnemyUnitCategory
    BattleEnemyUnitClass
    BattleEnemyUnitCurrentFormation
    BattleEnemyUnitOnLeftFlank
    BattleEnemyUnitOnRightFlank
    BattleEnemyUnitSpecialAbilitySupported
    BattleEnemyUnitTechnologySupported
    BattleHasCoverBuildings
    BattleHasCoverWalls
    BattleIsLandConflict
    BattleIsNavalConflict
    BattleIsSiegeConflict
    BattlePlayerAllianceDefendingHill
    BattlePlayerAlliancePercentageCanHide
    BattlePlayerAlliancePercentageOfAmmoType
    BattlePlayerAlliancePercentageOfClassAndCategory
    BattlePlayerAlliancePercentageOfMountType
    BattlePlayerAlliancePercentageOfSpecialAbility
    BattlePlayerAlliancePercentageOfTechnology
    BattlePlayerAlliancePercentageOfUnitCategory
    BattlePlayerAlliancePercentageOfUnitClass
    BattlePlayerAllianceToEnemyAllianceRatio
    BattlePlayerDefendingFort
    BattlePlayerDirectionOfMeleeAttack
    BattlePlayerDirectionOfMissileAttack
    BattlePlayerSailsPercentageDamaged
    BattlePlayerShipActionStatus
    BattlePlayerShipClass
    BattlePlayerUnitActionStatus
    BattlePlayerUnitAmmoType
    BattlePlayerUnitCategory
    BattlePlayerUnitClass
    BattlePlayerUnitCurrentFormation
    BattlePlayerUnitDefendingHill
    BattlePlayerUnitEngaged
    BattlePlayerUnitEngagedInMelee
    BattlePlayerUnitMountType
    BattlePlayerUnitMovingFast
    BattlePlayerUnitSpecialAbilityActive
    BattlePlayerUnitSpecialAbilitySupported
    BattlePlayerUnitTechnologySupported
    BattleResult
    BattlesFought
    BattleShipIsPlayers
    BattleShipSailsPercentageDamage
    BattleType
    BattleUnitIsAllied
    BattleUnitIsPlayers

    No thing is everything. Every thing is nothing.

  4. #4
    MaradoX-'s Avatar Libertus
    Join Date
    Mar 2009
    Location
    Belgium
    Posts
    55

    Default Re: An interesting idea

    Quote Originally Posted by alpaca View Post
    Could you post your script? I think it might be helpful

    As for battles, there seem to be many different conditions that are active during battles, no idea if the campaign script is paused then or not:

    BattleAllianceIsAttacker
    BattleAllianceIsPlayers
    BattleAllianceNumberOfShips
    BattleAllianceNumberOfUnits
    BattleEnemyAlliancePercentageCanHide
    BattleEnemyAlliancePercentageOfClassAndCategory
    BattleEnemyAlliancePercentageOfMountType
    BattleEnemyAlliancePercentageOfSpecialAbility
    BattleEnemyAlliancePercentageOfUnitCategory
    BattleEnemyAlliancePercentageOfUnitClass
    BattleEnemyDirectionOfMeleeAttack
    BattleEnemyHasMissileSuperiority
    BattleEnemyShipActionStatus
    BattleEnemyShipOnFire
    BattleEnemyUnitActionStatus
    BattleEnemyUnitCategory
    BattleEnemyUnitClass
    BattleEnemyUnitCurrentFormation
    BattleEnemyUnitOnLeftFlank
    BattleEnemyUnitOnRightFlank
    BattleEnemyUnitSpecialAbilitySupported
    BattleEnemyUnitTechnologySupported
    BattleHasCoverBuildings
    BattleHasCoverWalls
    BattleIsLandConflict
    BattleIsNavalConflict
    BattleIsSiegeConflict
    BattlePlayerAllianceDefendingHill
    BattlePlayerAlliancePercentageCanHide
    BattlePlayerAlliancePercentageOfAmmoType
    BattlePlayerAlliancePercentageOfClassAndCategory
    BattlePlayerAlliancePercentageOfMountType
    BattlePlayerAlliancePercentageOfSpecialAbility
    BattlePlayerAlliancePercentageOfTechnology
    BattlePlayerAlliancePercentageOfUnitCategory
    BattlePlayerAlliancePercentageOfUnitClass
    BattlePlayerAllianceToEnemyAllianceRatio
    BattlePlayerDefendingFort
    BattlePlayerDirectionOfMeleeAttack
    BattlePlayerDirectionOfMissileAttack
    BattlePlayerSailsPercentageDamaged
    BattlePlayerShipActionStatus
    BattlePlayerShipClass
    BattlePlayerUnitActionStatus
    BattlePlayerUnitAmmoType
    BattlePlayerUnitCategory
    BattlePlayerUnitClass
    BattlePlayerUnitCurrentFormation
    BattlePlayerUnitDefendingHill
    BattlePlayerUnitEngaged
    BattlePlayerUnitEngagedInMelee
    BattlePlayerUnitMountType
    BattlePlayerUnitMovingFast
    BattlePlayerUnitSpecialAbilityActive
    BattlePlayerUnitSpecialAbilitySupported
    BattlePlayerUnitTechnologySupported
    BattleResult
    BattlesFought
    BattleShipIsPlayers
    BattleShipSailsPercentageDamage
    BattleType
    BattleUnitIsAllied
    BattleUnitIsPlayers
    Do you have any idea what variables contain the endresults of a battle?
    Divide and conquer...

  5. #5
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: An interesting idea

    I don't think there are any. CA doesn't really expose object info to lua, instead they implemented something like their condition system from RTW. Almost all of them only return true/false values as far as I could gather. It's hard to test though, maybe there are overrides that I can't check. CharacterTrait for example returns an integer value.

    No thing is everything. Every thing is nothing.

  6. #6

    Default Re: An interesting idea

    There is some MP info, but I couldn't find results yet

    All LUA objects used by the game internally, but probably not exposed to us
    Spoiler Alert, click show to read: 

    <class CustomControl>
    <class EMPIRE::EMPIRE_MP>
    <class EMPIRE::FRONT_END>
    <class EMPIREBATTLE::BATTLE_SETUP_INFO>
    <class EMPIRECAMPAIGN::CAMPAIGN_COMMAND_QUEUE>
    <class EMPIRECAMPAIGN::CHARACTER>
    <class EMPIRECAMPAIGN::FACTION>
    <class EMPIRECAMPAIGN::FORT>
    <class EMPIRECAMPAIGN::GARRISON_RESIDENCE>
    <class EMPIRECAMPAIGN::POST_BATTLE_NAVAL_INTERFACE>
    <class EMPIRECAMPAIGN::REGION>
    <class EMPIRECAMPAIGN::SIEGE>
    <class EMPIRECAMPAIGN::UNIT>
    <class EMPIRECOMMON::EMPIRE_ONLINE_PRESENCE>
    <class EMPIRECOMMON::GAME_CORE>
    <class EMPIREUTILITY::KEYBOARD_SHORTCUT_DESCRIPTION>
    <const class EMPIREBATTLE::SHIP>
    <const class EMPIREBATTLE::UNIT>
    <const class EMPIRECAMPAIGN::BUILDING>
    <const class EMPIRECAMPAIGN::CAMPAIGN_CAMERA_MANAGER>
    <const class EMPIRECAMPAIGN::CAMPAIGN_MODEL>
    <const class EMPIRECAMPAIGN::CAMPAIGN_THEATRE>
    <const class EMPIRECAMPAIGN::CHARACTER>
    <const class EMPIRECAMPAIGN::FACTION>
    <const class EMPIRECAMPAIGN::FORT>
    <const class EMPIRECAMPAIGN::GARRISON_RESIDENCE>
    <const class EMPIRECAMPAIGN::POST_BATTLE_NAVAL_UNIT>
    <const class EMPIRECAMPAIGN::RECRUITMENT_ITEM>
    <const class EMPIRECAMPAIGN::REGION>
    <const class EMPIRECAMPAIGN::REGION_RECRUITMENT_MANAGER>
    <const class EMPIRECAMPAIGN::REGION_SLOT>
    <const class EMPIRECAMPAIGN::SETTLEMENT>
    <const class EMPIRECAMPAIGN::SIEGE_EQUIPMENT_CONSTRUCTION_ITEM>
    <const class EMPIRECAMPAIGN::SIEGEABLE_GARRISON_RESIDENCE>
    <const class EMPIRECAMPAIGN::UNIT>
    <const class EMPIRECAMPAIGNAI::DIPLOMATIC_ACTION>
    <const class EMPIRECAMPAIGNAI::NEGOTIATION>
    <const class EMPIREUTILITY::EMPIRE_DATABASES>
    <const struct EMPIREUTILITY::EVENT_RECORD>
    <const struct EMPIREUTILITY::TECHNOLOGY_RECORD>
    <const struct EMPIREUTILITY::UNIT_RECORD>
    <int>
    <struct CA::ImageType<struct CA::Pixel8888>>
    <struct ITEXTURE>


    MP related functions, that are available through LUA (this part is missing a bunch of information still)
    Spoiler Alert, click show to read: 
    Create multiplayer game
    CreateMPGame

    Start multiplayer battle
    StartMPBattle

    Quit
    Quit

    Out: Boolean, are we logged on in online mode (false if lan), nil if not logged on
    MPIsOnline

    Out: Boolean, are we joining a game via an invite in online mode (false if lan), nil if not joining on
    MPIsJoiningByInvite

    In: Lan mode (true|false). Log on to multiplayer. Out: Result code
    MPLogOn

    In: bool (true = online, false = lan) Out: true/false if the multiplayer system is ready for action
    MPReadyForLogOn

    Log out of multiplayer. Returns true or false on success'
    MPLogOut

    In: index, password, join the multiplayer game with the specified index. Password string can be empty
    MPJoinGame

    In: Room id
    MPChangeRoom

    Out: Pointer to the multiplayer control module (to be passed to UIMPInterface object
    MPInterface

    Out: Pointer to the online presence that exists in game core
    MPOnlinePresence

    In: Integer value representing size of army (0-2). bool: is naval. Out: Allowed funds for that size
    ArmyFundsForSize

    In: (Opt) current scale factor, Out: float value representing current unit scale, index into scale factors list : 0-3
    UnitScaleFactor

    In: Bool - show clan members Out: List of details about appropriate friends listed on Steam
    SteamFriendsList

    Friends
    friend
    Name
    Id

    In: Array of Steam Player Id's.
    MPInviteToGame

    Invitees
    Out: Details of the current game (preferences as set by host), or nil if not in a game

    MPCurrentGameDetails
    Turns
    Date
    late
    Middle
    early
    custom_armies
    unknown weather type

    MPHasLobby

    MPLocalPlayerInLobby
    Out: Steam id for local player

    MPLocalPlayerId
    Out: A table with lots of information about the local player used by the stats screen

    MPLocalPlayerStats
    Command
    Score
    Achievements
    achievement
    Icon
    Title
    Stats
    stat
    Value

    In: Table containing: Game map path, map_name, game name, password, max_players, ranked, customise_armies, battle type, army_size (as int). Hosts a battle.
    MPHostCustomBattle

    prefs
    password
    game_name
    File
    Name
    Type
    Key
    TotalPlayers
    army_size
    weather
    time_of_day
    wind
    era
    time_limit
    spectators
    unit_scale
    ranked
    map

    In: Game name and password. Out: Boolean success value
    MPHostCampaign

    Out: Retrieve the name of the player
    LocalPlayerName

    In: Boolean to specify whether it should be a land battle or not
    MPQuickBattleStart

    Cancels any quick battle matchmaking
    MPQuickBattleCancel

    Out: Table of details about the quick battle matchmaking process, or nil if matchmaking complete
    MPQuickBattleDetails

    TimeRemaining

    Out: Returns whether we have passed the point of no return when looking for quick battles
    MPCanCancelQuickBattle

    Last edited by just; March 27, 2009 at 08:54 AM.

  7. #7

    Default Re: An interesting idea

    Could you post your script? I think it might be helpful
    Of course, but i have to warn you that i have no real idea what im doing there.

    I have absolutly no expirence with lua or total war and just messing around with the code to learn a bit.

    But in the quik and very very dirty way.

    Basicly im abusing the advice events to write a log on certain events.

    Code:
    -- LOGGING TRIGGERS BY STEINIG
    logfile = "etw.log"
    local file = assert(io.open(logfile, "w"))
    file:write("-----------------------------------START-----------------------\n")
    
    events.FactionRoundStart[#events.FactionRoundStart+1] =
    function (context)
        if conditions.FactionIsLocal(context) then
            local file = assert(io.open(logfile, "a"))
            tn = conditions.TurnNumber(context)
            file:write("---------------- Turn")
            file:write(tn)
            file:write(" ---------------\n")
            return true
        end
        return false
    end
    
    -- LOG WON BATTLES
    events.CharacterCompletedBattle[#events.CharacterCompletedBattle+1] =
    function (context)
        if conditions.CharacterIsLocalCampaign(context) and conditions.CharacterWonBattle(context) then
            local file = assert(io.open(logfile, "a"))
            file:write("Battle WON\n")
            return true
        end
        return false
    end
    no idea if the campaign script is paused then or not:
    If you mean the trigger scripts, they restart after battle starting.

    I tried this:
    Code:
    events.BattleConflictPhaseCommenced[#events.BattleConflictPhaseCommenced+1] =
    function (context)
        if conditions.BattleAllianceIsPlayers(context) then
            local file = assert(io.open(logfile, "a"))
            file:write("***Battle***\n")
            troops = conditions.BattleAllianceNumberOfUnits(context)
            file:write("Your Army contains ")
            file:write(troops)
            file:write(" units\n")    
            return true
        end
        return false
    end
    With the output:

    Code:
    ***Battle***
    Your Army contains 2 units
    Last edited by Steinig; March 26, 2009 at 12:10 PM.

  8. #8
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: An interesting idea

    just: Sorry, I'm pretty much a noob at lua. How do you get that list (from the exe?) and how can I access the members (and methods?) of those classes?

    Edit: Are you sure that these aren't just the classes that are passed to the LuA interface on the C++ side? I don't think they're exposed to lua but are used to fill the conditions in.
    Last edited by alpaca; March 26, 2009 at 01:49 PM.

    No thing is everything. Every thing is nothing.

  9. #9

    Default Re: An interesting idea

    Hi, im a noob too, thats the problem

    I also dont have a list of conditions i just use those allredy used somwhere in the code.

    And yes it could be classes from the c++ side or whatever the backend is coded with.
    But that doesnot make them less usefull.

  10. #10
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: An interesting idea

    Quote Originally Posted by Steinig View Post
    Hi, im a noob too, thats the problem

    I also dont have a list of conditions i just use those allredy used somwhere in the code.

    And yes it could be classes from the c++ side or whatever the backend is coded with.
    But that doesnot make them less usefull.
    Of course it makes them less useful, it makes them completely useless because if it's on the C++ side of things we can't change it...

    As for conditions: I posted their names somewhere but I don't know how to get their arguments

    No thing is everything. Every thing is nothing.

  11. #11

    Default Re: An interesting idea

    Hmm, what I thought are objects might indeed not be available to LUA on our side, but the MP functions I mentioned should exist, because in the same place I found:

    ScrollCamera
    scroll the camera along a spline. ScrollCamera(seconds_it_takes_to_complete, list_of_coodinates...)

    And in scripting.lua for the main campaign I find :
    CampaignUI.ScrollCamera(18, {-57.000, 418.000, 0.75},
    {-29.000, 362.000, 0.95},
    {36.000, 371.000, 0.95},
    {98.000, 378.000, 0.85})

    So the function exists and the definition matches exactly.

  12. #12

    Default Re: An interesting idea

    I'd love a spreadsheet similar to that done for the SPQR mod for RTW, where you keep track of your Legions.

  13. #13

    Default Re: An interesting idea

    Some legal reversing this time:
    The CampaignUI has the following functions:
    Spoiler Alert, click show to read: 

    AgentCardSelectionChanged
    AgentEmbarkOrDisembark
    AgentGentlemanDuel
    AgentRakeAssassinate
    AgentRakeSubterfuge
    AttachMovieToComponent
    AttachRadarView
    AutoManage
    BattleResultsRefresh
    BattleSetupShip
    BattleSetupShipFromRecord
    BattleSetupUnit
    BattleSetupUnitFromRecord
    BeginConstruction
    BeginResearch
    BeginStealing
    BeginUpgrade
    BuildFort
    BuildingBrowserDetails
    BuildingDetails
    BuildingEffects
    BuildingPointer
    BuildingRecordDetails
    CameraManager
    CameraPosition
    CameraTarget
    CameraView
    CampaignIsEpisodic
    CampaignModel
    CanAgentEmbarkOrDisembark
    CanArmyEmbarkOrDisembark
    CancelConstruction
    CancelOrderForSelectedCharacter
    CancelRecruitment
    CancelResearch
    CancelSiegeEquipment
    CancelStealing
    CancelUpgradeFort
    CanDemolishBuilding
    CanDisbandUnit
    CanEndTurn
    CanPromoteUnit
    CanResearch
    CanSackMinister
    CanSave
    CanSteal
    CanUnitsMerge
    ChanceToSteal
    ChangeAdviceMode
    ChangeIngameOptions
    CharacterInEnemyResidence
    CharacterInValidEnemyUniversity
    CharacterPointer
    CharacterResidence
    CharactersRelationshipToPlayersFaction
    ClosestRegionToCamera
    ClosestSlotToCamera
    ConstructBuildingTree
    CurrentGameOptions
    CurrentSeasonString
    CurrentTurn
    CurrentYear
    DebugMessage
    DeclareWarInstant
    DeclineSidingWithAlly
    DemolishBuilding
    DemolishFort
    DemoteAdmiral
    DisbandUnit
    DismissCurrentAdvice
    DisplayingTurns
    EnableShortcutHandler
    EndTurn
    EnqueueSiegeEquipment
    EnterRevolutionaryRegion
    EntityTypeSelected
    EnumerateCampaignSaves
    ExitPreBattleContinuingSiege
    FactionDetails
    FactionsUniversities
    FileExtenstionAndPathForWriteClass
    Finalise
    FinaliseDuel
    FinaliseExchange
    FinaliseMoveTransition
    FinalisePendingAction
    FinalisePendingDuel
    FormatString
    FortDetails
    FortEffects
    GentlemanStealing
    GetCurrentGameInfo
    GetExtendedSaveGameInfo
    GovernorshipList
    HighlightConstructionItem
    HighlightRecruitmentItem
    HoldElections
    HomeTheatre
    InformAdviceReachedRender
    InitialiseCharacterDetails
    InitialiseGovernmentDetails
    InitialiseRecruitableUnitDetails
    InitialiseRegionInfoDetails
    InitialiseTechDetails
    InitialiseUnitDetails
    InstigateAssassination
    InstigateDuel
    InstigateSabotage
    InviteAlliesIntoWar
    IsCharacterInPortResidence
    IsCharacterPlayerControlled
    IsConstructionItemHighlighted
    IsPlayersTurn
    IsRecruitmentItemHighlighted
    IsUnitMergePossible
    KickMinister
    LastReviewPanelSelectionMethod
    LoadCampaign
    LocalisationString
    MergeUnits
    MergeUnitsWithFirst
    MinisterPortraitPath
    MissionsDetails
    MonarchyInfo
    MoveIntoTarget
    MovieDismissed
    NavalUnitLimit
    NextAutoEntitySelection
    NextAutoSettlementSelection
    OptimizeShip
    PauseCampaign
    PlayerChoosesRevolutionSide
    PlayerFactionId
    PlayerHasFunds
    PlayerIgnoresBankruptcy
    PlayerOwnedUnit
    PlayerPlayingAsRevolutionaries
    PlayersCulture
    PlayerSelected
    PlayersFaction
    PlayersFactionKey
    PlayerSidesWithRevolutionaries
    PostNavalBattleRefresh
    PostNavalBattleSetupValid
    PreBattleAttack
    PreBattleAutoResolve
    PreBattleDemandSurrender
    PreBattleNightAttack
    PreBattlePlayerSurrenderDecision
    PreBattleRetreat
    PreBattleSiegeAttack
    PreBattleSiegeHold
    PreBattleSiegeNightAttack
    PreBattleSiegeResolve
    PrestigeDetails
    PreviousAutoEntitySelection
    PreviousAutoSettlementSelection
    PromoteUnits
    QuickLoad
    QuickSave
    QuitToMainScreen
    QuitToWindowsFromEscapeMenu
    RecruitUnit
    RegimentName
    RegionFromSelection
    RegionKeyFromAddress
    RegionKeyFromSlot
    RegionsGovernorship
    RegionsInTheatre
    RegionsOwnedByFaction
    RegionsPublicOrders
    RegionTaxDetails
    RepairBuilding
    RepairFort
    RepeatAdvice
    RequestAssassinationTargets
    RequestDuelTargets
    RequestSabotageTargets
    RetrieveContainedEntitiesFromCharacter
    RetrieveContainedEntitiesFromGarrison
    RetrieveDiplomacyDetails
    RetrieveDiplomaticOpinions
    RetrieveDiplomaticStanceString
    RetrieveExistingTreaties
    RetrieveFactionAgentsList
    RetrieveFactionListForDiplomacy
    RetrieveFactionMilitaryForceLists
    RetrieveFactionRegionList
    RetrieveGameCore
    RetrieveGovernorshipDetails
    RetrieveRemainingMilitaryAccessTurns
    RetrieveVisibleEnitityDetails
    ReturnToCampaignFromEscapeMenu
    RevertShipToPrize
    ReviewPanelInfo
    ReviewPanelTabSelectionSet_1_Indexed
    SaveCampaign
    ScreenSize
    ScrollCamera
    ScupperToggleShip
    SelectAndZoomToCharacter
    SelectAndZoomToRegion
    SelectAndZoomToSlot
    SetAutomanageConstruction
    SetAutomanageTaxes
    SetCameraTarget
    SetCameraZoom
    SetGovernorshipTaxRate
    SetMyUnitName
    SetRegionTaxed
    SetReinforcementsOrder
    SetSuccessor
    SettlementsRegion
    ShouldShowLabelBottomRow
    ShowBuildingInfoOnDblClick
    ShowExchangeScreenForDockedNavy
    SideWithAlly
    SlotKeyFromAddress
    SplitFromForce
    StateGiftValues
    StopCamera
    StopMovieInComponent
    SwapMinisters
    TakePrizeShip
    TechEffects
    TechnologyPlayerDetails
    TechnologyResearchingDetails
    TechnologyStealingDetails
    TheatreList
    TheatreMapDimensions
    TheatreMapPaths
    Time
    ToggleFlagDisplay
    ToggleLabels
    ToggleMoveSpeed
    ToggleReplenishUnit
    TradeInfo
    TriggerAdviceForPanel
    TriggerBuildingCardSelectedEvent
    TriggerBuildingInfoPanelOpenEvent
    TriggerCharacterInfoPanelOpenedEvent
    TriggerMessageDropEvent
    TriggerMessageOpenedEvent
    TriggerPanelClosedEvent
    TriggerPanelOpenEvent
    TriggerTechnologyInfoPanelOpenEvent
    TriggerTooltipAdvice
    TriggerUnitSelectedEvent
    TurnsToCompleteResearchingTechnology
    TurnsToResearch
    UILocalisationString
    UnitPointer
    UnitScaleFactor
    UnitSelectionChanged
    UniversityResearching
    UpdateRadarView
    UpgradeFort
    Valid
    ValidAsassinationTargetsInResidence
    ValidDuelTargetsInResidence
    ValidSabotageTarget
    WindowsTime
    ZoomToAdviceLocation
    ZoomToCapital
    ZoomToCharacter
    ZoomToRegion


    I also found that the game loads a number of modules, these are (those with a * are internal lua objects, some more might be as well):
    string
    data.export_historic_characters
    package *
    _G *
    utilities
    huds
    panelmanager
    labels
    os
    table *
    math
    export_advice
    coroutine
    data.export_triggers
    construction
    CoreUtils
    debug
    data.export_missions
    agents
    EpisodicScripting
    army
    siegeequipment
    bit
    io *
    data.events
    Utilities
    message_handler
    export_historic_events
    data.export_ancillaries
    recruitment

    If anyone knows what kind of thing CampaignUI is I would like to know (so I can find more of the same). The weird thing is that it doesn't appear among the loaded modules, so that it is not.

  14. #14
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: An interesting idea

    Any way to find out what's in agents for example?

    The CampaignUI is possibly userdata, injected into the namespace by C++

    Do you have any idea if it's possible to find out which arguments a function takes from lua? I'd be interested in some of the stuff in campaign ui.

    Good job by the way

    Edit: os, math, coroutine, debug and I think bit are also lua-packages

    No thing is everything. Every thing is nothing.

  15. #15

    Default Re: An interesting idea

    I haven't been able to find that out, I do have found all of the functions for the Campaign part of the game.

    I'll start working on getting the arguments for the functions (I think it would only be possible to get the amount of arguments, as lua doesn't seem to be strongly typed)

    Where it says "70: function" I already removed the first 69 for clarity. I have no idea what those unnamed functions do, but you should be able to call them through pcall.

    Spoiler Alert, click show to read: 

    Code:
    local advice = require "export_advice"
    local historic_events = require "export_historic_events"
    local scripting = require "EpisodicScripting"


    p.s. MaradoX-, sorry for hijacking your thread
    Last edited by just; March 27, 2009 at 03:03 PM.

  16. #16
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: An interesting idea

    Quote Originally Posted by just View Post
    I haven't been able to find that out, I do have found all of the functions for the Campaign part of the game.

    I'll start working on getting the arguments for the functions (I think it would only be possible to get the amount of arguments, as lua doesn't seem to be strongly typed)

    Where it says "70: function" I already removed the first 69 for clarity. I have no idea what those unnamed functions do, but you should be able to call them through pcall.

    Spoiler Alert, click show to read: 

    Code:
    local advice = require "export_advice"
    local historic_events = require "export_historic_events"
    local scripting = require "EpisodicScripting"


    p.s. MaradoX-, sorry for hijacking your thread
    Arr, thread hijacking

    Amount of arguments would already be very useful, I haven't found a way to get any info yet except for the debug.getinfo() but that's mostly useless (or I didn't really understand it).

    No thing is everything. Every thing is nothing.

  17. #17

    Default Re: An interesting idea

    That doesn't seem to give the right information. I think one of us has to start working on a LUA decompiler. You do it or I do it?

  18. #18

    Default Re: An interesting idea

    Could in this case someone tell me whats the differents between the compiled luac files in the pack files and the uncompiled ones in the empire\data\ui folders ?

  19. #19

    Default Re: An interesting idea

    Are there uncompiled ones? I don't think there should be.

  20. #20

    Default Re: An interesting idea

    awsome idea

Page 1 of 2 12 LastLast

Posting Permissions

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