Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization: Call To Power > CtP-Creation > SLIC variable section
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
12.Sep: `CTP CHALLENGE LADDER` - SEPTEMBER UPDATE
09.Sep: EARLY BUILD SPRITE EDITOR
02.Aug: `SUPERLEAGUE` SIGN-UP

bottom of page
  - CIVILIZATION: CALL TO POWER @ GAMESTOP $9.99 - CIVILIZATION: CALL TO POWER @ AMAZON $9.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
PN is offline PN
Prince
Leeds, West Yorkshire, UK
Mar 2001
time: 05:13
Question  Old Post 21-03-2001 13:39
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
SLIC variable section Get a bigger avatar today!

Does anybody know how I can make use of some of the SLIC builtin variables which don't appear in the Activision documentation, but do appear in the game's text files?

For example the info_str.txt file contains
"The [player.1.civ_name_plural] have been utterly defeated."

If I borrow this idea and put the following in one of my txt files:
PN_TEXT_Big_Ranking_All "WEIGHTED RANKING (Year [date.value]):\n[finalrank1.value]. [player.1.civ_name_plural], [score1.value]"

and use it as a parameter to an alert box then this appears:

WEIGHTED RANKING (Year [date.value]):
[finalrank1.value]. [player.1.civ_name_plural], [score1.value]

but if I change the definition to remove the variable [player.1.civ_name_plural] and replace it with some fixed text so that it is defined instead as:
PN_TEXT_Big_Ranking_All "WEIGHTED RANKING (Year [date.value]):\n[finalrank1.value]. This is annoying, [score1.value]"

then my alert box contains:

WEIGHTED RANKING (Year 0):
3. This is annoying, 1601

So including [player.1.civ_name_plural] stops all the other variables from being translated properly.

(BTW I do have DEBUGSLICS=YES)

gemini is offline gemini
Settler

Jan 1970
time: 05:13
Talking  Old Post 22-03-2001 06:38
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton buy from Amazon

Yes, I've run into that kind of problem as well. But I have come to the conclusion that if you are going to use [player.1.civ_name_plural] in a message you also must use a player in context in your trigger. So for example if you have a trigger that fires when there is combat between two players then [player.1.civ_name_plural] would work in your message. But if you have a trigger that collects data that doesn't use a player in context than [player.1.civ_name_plural] won't work in a message. You might want to try using the setplayer function in your trigger and see if you have different results. Hope this helps and if anyone else knows for sure please post!

Also can someone from apolyton please fix my profile, it says I'm a settler or something and I had way more posts before you had your server problems that erased my profile.

------------------

[This message has been edited by gemini (edited March 21, 2001).]

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:13
Post  Old Post 22-03-2001 17:45 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Get a bigger avatar today!

Gemini is right, you'll have to define player.1 first in some way. I haven't looked at CtP1 SLIC since August or so but something like player.1 = 1 in the SLIC code that calls the message might do the trick, presuming you'd want player 1 (the human player) to be the one of which the score is displayed.

Gemini,
I think you'll have to email Markos for that, I don't think any of the mods are reading this forum anymore...

PN is offline PN
Prince
Leeds, West Yorkshire, UK
Mar 2001
time: 05:13
Question  Old Post 24-03-2001 04:54
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Suffering from ads?

My trigger doesn't use player in the context, I'll give it a try. What I really want to do is display a "league table" in an alert box that shows all the civilization names, not just player.1 Do u think that this will be possible if I get the player context as my trigger?

Flandrien is offline Flandrien
King
Belgium
May 2000
time: 06:13
Post  Old Post 25-03-2001 19:08
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

If you don't have a player in your context, try g.player in your text.
This should always be available.

Edit: You could also try the SetPlayer function, but strangely enough I don't see a variable that gives the number of players ?
(g.totalplayers, like player.totalunits)
[This message has been edited by Maestro (edited March 25, 2001).]

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:13
Post  Old Post 26-03-2001 00:17 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton

PN,
Several players are easy: player.1 = 1; player.2 = 2, player.3 = 3, etc. player.x is available for as many players as you need. Also, it's probably a good idea to figure out how Maestro's suggestion of SetPlayer works. As I said, I'm not used to SLIC1 syntax anymore so it's quite possible you can't just say player.x = x in CtP1. There should be a couple of examples in the MedMod I SLIC code and some of the other SLIC mods people made.

PN is offline PN
Prince
Leeds, West Yorkshire, UK
Mar 2001
time: 05:13
Post  Old Post 26-03-2001 01:06
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Suffering from ads?

Thanks Locutus and Maestro. I'm using this type of construct for cycling through the players:

nump=Preference("NumPlayers")-1;
pnum=1;
while (pnum <= nump) {
SetPlayer(1,pnum);
....Player.1 will now allow me to get data for player.
if (pnum==1) score1=...
else if (pnum==2) score2=..
etc.
}

I nicked this from Powerslics. g.player is not affected by this and remains the current player. Maestro, note that the Preferences call returns the number of players (inc. Barbarians)

The code is triggered by 'when (IsHumanPlayer(g.player))' so the Alert Box with the scores appears right at the beginning of each player's turn. Can either of you suggest a different trigger that gives me the player context and lets me use [player.1.civ_name_plural]?

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:13.
Apolyton Time is 00:13.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0412 seconds (89.27% PHP - 10.73% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net