Thread Tools
Old November 21, 2000, 22:18   #1
Nemo
Prince
 
Nemo's Avatar
 
Local Time: 03:41
Local Date: October 31, 2010
Join Date: Apr 1999
Location: numsquam
Posts: 683
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
Nemo is offline  
Old November 22, 2000, 09:30   #2
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:41
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
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.
Locutus is offline  
Old November 23, 2000, 00:55   #3
Gedrin
Warlord
 
Local Time: 09:41
Local Date: October 31, 2010
Join Date: Jun 1999
Posts: 139
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
Gedrin is offline  
Old November 23, 2000, 05:32   #4
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 11:41
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
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 ).
Locutus is offline  
Old May 3, 2002, 06:31   #5
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:41
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
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
Immortal Wombat is offline  
Old May 3, 2002, 11:03   #6
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 11:41
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
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
__________________
Civ2 military advisor: "No complaints, Sir!"

Last edited by Martin Gühmann; May 4, 2002 at 06:25.
Martin Gühmann is offline  
Old May 3, 2002, 13:40   #7
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 10:41
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
/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
Immortal Wombat is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:41.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team