Announcement

Collapse
No announcement yet.

slic functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • slic functions

    ok i am trying to implement a slic command as follows but i am missing hte predfined funtion name:

    Button(ID_BUILD) {
    Kill();
    Open?();
    }

    where the "?" is i want to put in teh build manager window. i have tried many tags that i have thought may have been teh function, which i found routing through other CTPII files. does the build manger window function exist? if so what is it? if not which files are needed to create teh function (i.e. can it all be implemented within the script.slc file (where this particualar code is inserted)? or are there otehr files that need to be called also?)

    an example of a funtion that works is OpenProductionTab
    but it only gives me the city tab brought up front on the interface at the bottom - i want the whole build window.

    Thanks

  • #2
    Hmm, the interface for CtPII was totally changed and unfortunately SLIC wasn't really updated to reflect this. Here's a list of all Open-functions that exist in SLIC with a description of what they did in CtPI. They all still exist in CtPII but I have no idea what any of these open now, so if you haven't already, try them all. If none of these works, then this would be something to put in a patch, I suppose...

    VOID OpenCity()
    Open the city status screen.

    VOID OpenCityTab()
    Set the control panel to the city tab.

    VOID OpenCiv()
    Open the civ status screen.

    VOID OpenCivTab()
    Set the control panel to the civ tab.

    VOID OpenDiplomacy()
    Open the diplomacy screen.

    VOID OpenInfo()
    Open the info screen.

    VOID OpenLaborTab()
    Open the labor tab.

    VOID OpenMaxTab()
    Open the max tab.

    VOID OpenOptions()
    Open the options screen.

    VOID OpenProductionTab()
    Open the production tab.

    VOID OpenScience()
    Open the science screen.

    VOID OpenThroneRoom()
    Open the throne room.

    VOID OpenTrade()
    Open the trade screen.

    VOID OpenUnit()
    Open the unit status screen.
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #3
      Ok what follows is my best first pass at jumping the gun on official SLIC docs:

      Trouble is if OpenProductionTab does not do it then I cannot image which of these are correct.

      Mind you these are all derived from imaginitave use of a hex editor on the ctp2.exe file so... take it for what it is worth.

      Also you will note that much of ctp(1) SLIC is still present although unrelated really.

      Gedrin


      SLIC built in variables
      g
      .year
      .year_str
      .player
      unit
      .owner
      .location
      .type
      .hp
      .valid
      .name
      city
      .owner
      .location
      .name
      .population
      .happiness
      .netcitygold
      .goldfromtraderoutes
      .building
      .buildingtime
      .buildqueuelength
      player
      .owner
      .cities
      .units
      .militaryunits
      .armiestotal
      .populationtotal
      .pollution
      .capital
      .largestcity
      .researching
      .militarystate
      .leaderperonality
      .govttype
      .civ_name_plural
      .civ_name_singular
      .country_name
      .leader_name
      .hehimhi
      .she_cap
      .him_cap
      .his_caps
      .irs
      .ir_cap
      .publicworkstax
      .publicworkslevel
      army
      .owner
      .location
      .size
      location
      .locationxy
      government
      .type
      advance
      .type
      .name
      action
      .textname
      improvement
      .typevalue
      .value
      building
      .name
      .type
      wonder
      .name
      .type
      unitrecord
      .name
      .attack
      .defense
      .cost
      .ranged
      .movement
      .goldvalue
      good
      .name
      special
      .discovery
      .gold
      .popUnit

      SLIC functions:
      ContinueGetInputStop
      DBAdvance
      DBTerrain
      DBBuilding
      DBWonder
      DBFeat
      DBResource
      DBOrder
      DBTerrainImprovement
      DBGovernment
      DBStrategy
      DBDiplomacy
      DBmod_CanPlayerHaveAdvance
      mod_CanCityBuildUnit
      mod_CanCityBuildBuilding
      mod_CanCityBuildWonder
      mod_CityHappiness
      mod_UnitAttack
      mod_UnitRangedAttack
      mod_UnitDefenseChange
      GlobalRegard
      CityName
      CompareString
      CompareCity
      IsNamed
      CellOwner
      GetCurrentRound
      GetCurrentYear
      CityIsValid
      TradePointsInUse
      GetUnitFromCell
      GetUnitsAtLocation
      CityStarvationTurns
      PlayerWagesLevel
      PlayerRationsLevel
      PlayerWorkdayLevel
      PlayerRationsExp
      PlayerWorkdayExp
      PlayerWagesExp
      CityFoodDelta
      GetRevolutionLevel
      GetRiotLevel
      HasGood
      SquaredDistance
      Distance
      IsFortress
      AddFeat
      GetMapWidth
      GetMapHeight
      TargetNuclearAttack
      GetNuclearLaunchTarget
      GetLastColdwarAttack
      GetLastHotwarAttack
      TurnsAtWar
      TurnsSinceLastWar
      CancelAgreement
      HasAgreement
      HasAgreementWithAnyone
      EffectiveWarWith
      AtWarWith
      EffectiveAtWarCount
      AtWarCount
      GetAdvanceLevel
      PercentCanBuySurplus
      GetGoldSurplus
      PercentGetTributeFrom
      GetTradeFrom
      ChangeDiplomaticState
      ConsiderDiplomaticState
      ComputeCurrentStrategy
      ConsiderStrategicState
      SetNewProposal
      ConsiderNewProposal
      ConsiderMotivation
      SetResponse
      ConsiderResponse
      RecomputeRegard
      SetTrust
      GetTrust
      GetEffectiveRegard
      GetPublicRegard
      LogRegardEvent
      GetCityByIndex
      GetArmyByIndex
      GetUnitByIndex
      GetUnitFromArmy
      Export
      Import
      ExitToDesktop
      CivilizationIndex
      PlayerCivilization
      AddEffect
      AddCenter
      BlankScreen
      UnitHasUserFlag
      GetStringDBIndex
      SetStringByDBIndex
      SetString
      Stacked
      SetPW
      KillEndgameFromBuildList
      KillWonderFromBuildList
      KillBuildingFromBuildList
      KillUnitFromBuildList
      AddEndgameToBuildList
      AddWonderToBuildList
      AddBuildingToBuildList
      AddUnitToBuildList
      IsWonderAtHead
      IsBuildingAtHead
      IsEndgameInBuildList
      IsWonderInBuildList
      IsBuildingInBuildList
      IsUnitInBuildList
      DamageUnit
      GetNeighbor
      GetCityByLocation
      SetActionKey
      AddGold
      Heal
      CantEndTurn
      SelectCity
      SelectUnit
      CityCantRiotOrRevolt
      CantAttackCity
      CantAttackUnit
      IsVeteran
      ToggleVeteran
      AddMovement
      SetPreference
      Preference
      Deselect
      CatchUp
      ExecuteAllOrders
      GodMode
      Ozone
      Flood
      SetOrder
      MakeLocation
      SetLocation
      SetCityByIndex
      SetCitySetUnitByIndex
      SetUnit
      SetTimerGranularity
      ClearOrders
      UseDirector
      BreakNoPiracy
      BreakLeaveOurLands
      ClearBuildQueue
      KillEyepoint
      Message
      QuitToLobby
      EnableChooseResearch
      DisableChooseResearch
      IsInZOC
      SetResearching
      SetScience
      HasRiver
      LoadGame
      SaveGame
      GameOver
      IsPlayerAlive
      GetNearestWater
      CityCollectingGood
      SetPlayer
      GetMessageClass
      AddExpelOrder
      AllUnitsCanBeExpelled
      AddUnit
      GrantAdvance
      GetRandomNeighbor
      PlantGood
      Terraform
      FindCoastalCity
      CreateCoastalCity
      ExtractLocation
      CreateCit
      yPlaySound
      KillUnit
      AddPops
      ForceRegard
      Cities
      AttachRobot
      DetachRobo
      tAddCityByIndex
      Random
      CreateUnit
      EnableMessageClass
      DisableMessageClass
      StopTimer
      StartTimer
      GoodVisibutik
      GoodCountTotal
      GoodCount
      GoodType
      AddGoods
      EnableCloseMessage
      EnableCloseClass
      DisableClose
      IsHumanPlayer
      BuildingType
      IsCitySelected
      IsUnitSelected
      DontSave
      StopAttract
      Attract
      NetworkEject
      NetworkAccept
      Title
      CityHasBuilding
      KillClass
      MessageClass
      KillMessages
      UnitType
      UnitCount
      LibraryTileImprovement
      LibraryGovernment
      LibraryConcept
      LibraryTerrain
      LibraryAdvance
      LibraryWonder
      LibraryBuilding
      LibraryUnitTerrainType
      DoYouWillBreakRoute
      DoCityWillStarve
      DoCannotAffordSupport
      DoCannotAffordMaintenance
      DoFreeSlaves
      DoCertainRevolution
      DoSellImprovement
      DoPillageOwnLand
      DoOutOfFuel
      DoLandInOcean
      DoAutoUnload
      Show
      Abort
      FinishBuilding
      EndTurn
      AddOrderBreakAlliance
      RejectTradeBid
      AcceptTradeBid
      SendTradeBid
      ExitToShell
      OpenCityTab
      OpenProductionTab
      OpenLaborTab
      OpenMaxTab
      OpenCivTab
      OpenOptions
      OpenInfo
      OpenTrade
      OpenDiplomacy
      OpenScience
      OpenUnit
      OpenCity
      OpenCiv
      EnableScreensButton
      EnableTileImprovementButton
      DisableScreensButton
      DisableTileImprovementButton
      StealSpecificAdvance
      StealRandomAdvance
      SetGovernment
      DontAcceptTradeOffer
      AcceptTradeOffer
      BreakAgreement
      Duration
      CaptionMessage
      Type
      Research
      Surrender
      LeaveRegion
      CaptureRegion
      CaptureCity
      EyeDropdown
      UnderseaRank
      SpaceRank
      GeographicRank
      CitiesRank
      PopulationRank
      GoldRank
      TradeRank
      MilitaryRank
      KnowledgeRank
      Reject
      Accept
      DemandWarFromAllies
      ControlsRegion
      DeactivateTutorial
      Kill
      ChangeRegardLevel
      RegardLevel
      PlayerCityCount
      UnitsInCell
      UnitHasFlag
      IsInRegio
      nIsDiplomat
      IsActiveDefender
      IsSlave
      rIsCleric
      IsCounterBombardingUnit
      IsWonderType
      IsSpaceUnit
      IsSpaceCity
      IsUnderseaCity
      IsWormholeProbe
      IsBombardingUnit
      IsFlankingUnit
      IsSecondRowUnit
      AddCity
      HasSameGoodAsTraded
      TradeRoutes
      TradePoints
      IsHostile
      IsContinentBiggerThan
      HasAdvance
      Return0
      Return1
      EnableTrigger
      DisableTrigger
      EyePoint
      MessageAllBut
      MessageAll
      AddMessage
      MessageText
      PrintText
      PrintInt
      SetAllCitiesVisible
      SetCityVisible
      IsCivilian
      FinishImprovements
      RemoveAdvance
      PlayerGold
      GetArmyFromUnit
      ClearBattleFlag
      MinimizeAction
      IsUnitAtHead
      OpenScenarioEditor
      Duration
      Description
      SlicMessage
      SlicMessageValue
      EffectBoatMovement
      EffectBoatMovementValue
      EffectCityDefenseBonus
      EffectCityDefenseBonusValue
      EffectReduceCityWalls
      EffectReduceCityWallsValue
      EffectIncreaseCityVision
      EffectIncreaseCityVisionValue
      EffectIncreaseProduction
      EffectIncreaseProductionValue
      EffectIncreaseCommerce
      EffectIncreaseCommerceValue
      EffectIncreaseHappiness
      EffectIncreaseHappinessValue
      EffectEliminateDistancePenalty
      EffectEliminateDistancePenaltyValue
      EffectIncreaseBoatVision
      EffectIncreaseBoatVisionValue
      EffectIncreaseScience
      EffectIncreaseScienceValue
      EffectGiveMaps
      EffectIncreaseHitPoints
      EffectIncreaseHitPointsValue
      EffectScriptedTurn
      EffectScriptedTurnValue
      EffectScriptedCity
      EffectScriptedCityValue
      ExcludeAdvance
      ExcludeWonder
      ExcludeFeat
      ExcludeFunction
      ExcludeFunctionValue
      CancelAdvance
      CancelWonder
      CancelFeat
      CancelFunction
      CancelFunctionValue
      Building
      BuildingValue
      MinimumSizeOfCiv
      MinimumSizeOfCivValue

      Comment


      • #4
        Woow! I've been messing around with SLIC 2 for several months now but I see a did all that for nothing 'cause it seems like there's a *LOT* that was added at the last moment (or I just overlooked it of course ). I'm very pleased to that of course, presuming it all works Everything below 'Duration' is new to me, the 'Effect' things look very interesting.

        For those with SLIC 1 experience: the only function of SLIC1 that was removed (last time I checked anyway) is HasPop (because worker placement now works very differently). A lot of variables have been removed as well but their functionality remains, mostly in the form of events. Gedrin, you should take you hex editor and search the ctp2.exe file for the text 'MoveToOrder' (without the quotes of course), that should (after maybe one or two 'false alarms') bring up a list of all events in the game with a short description of each one of them. These events can all be 'listened for' (like the variables in SLIC 1) and some, if not most, of them can be 'called' as well (like functions). I'd post the list myself but since so much seems to have changed at the last moment it would only be incorrect.

        One thing though on your function list:
        Continue, GetInput and Stop are three seperate functions (hmm, GetInput is new to me as well) and the DB things should have DB behind their name, so it's WonderDB and not DBWonder.

        A few other things that you might find interesting about SLIC 2 is that it now has arrays, real functions (not that silly messagebox hack anymore), constants, global and local variables, a for loop and probably a few more I either haven't found out myself yet (or simply slip my mind at the moment ).
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #5
          bump

          Locutus, what effect do those Effect* functions have?
          Concrete, Abstract, or Squoingy?
          "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

          Comment


          • #6
            All the entries below duration including duration aren't slic functions, you kow I did what Locutus suggested above using an editor and copy all these strings in the ctp2.exe to another file. These effect functions aren't in the slic section but in the feat.txt section.

            Of course you can try them in a slic file but I am afraid that they won't work.

            -Martin
            Last edited by Martin Gühmann; May 4, 2002, 06:25.
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #7
              /me slaps self

              oh yeah
              Concrete, Abstract, or Squoingy?
              "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

              Comment

              Working...
              X