Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site forums as they ran on Ultimate Bulletin Board, 1998–2001. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 2005 site & forums

  Apolyton Civilization Site Forums
  CtP2-Creation
  Can anyone explain the mod_functions?

Post New Topic  Post A ReplyPost A Reply In A New Window

profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   Can anyone explain the mod_functions? Format for Better Printing
Jerk
Chieftain
Green Bay, WI USA
Nov 2000
posted January 22, 2001 14:01   Click Here to See the Profile for Jerk   send a private message to Jerk
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Can anyone explain the mod_functions? I can see in the senarios that come with the game what a few of them need and do but the others don't seem to be documented in any way. Much help would be appreciated for all of them. What arguements does each require, what do they do, what are the return values? Here is the list of mod_ functions aparantly built into the game:
mod_CanPlayerHaveAdvance
mod_CanCityBuildUnit
mod_CanCityBuildBuilding
mod_CanCityBuildWonder
mod_CityHappiness
mod_UnitAttack
mod_UnitRangedAttack
mod_UnitDefense

Thanks

heardie
GGS Co-Webmaster

Aug 1999
posted January 23, 2001 01:17   Click Here to See the Profile for heardieClick Here to Email heardie  send a private message to heardieSend a Message to UIN: 55652350 Visit heardie's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
some (all) of these aer not built in, and they are contained in ag_mod.slc, and the respective files for the other scenarios.
Locutus
Prince
Apolyton Borg Hengelo/Enschede, The Netherlands
Nov 1999
posted January 23, 2001 08:01   Click Here to See the Profile for LocutusClick Here to Email Locutus  send a private message to LocutusSend a Message to UIN: 52912776 Visit Locutus's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
You can find examples of the first 4 in the alexander scenario (and possibly others), they determine if a player can have a certain advance and if cities can build a certain unit/building/wonder. The others, I haven't seen in action yet and I suspect they aren't implemented and simply don't do anything. If anyone knows anything about those, I'd love to know too...
Jerk
Chieftain
Green Bay, WI USA
Nov 2000
posted January 24, 2001 04:53   Click Here to See the Profile for Jerk   send a private message to Jerk
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Thanks guys, I was looking for info on the last 4.

Herdie: I was under the impression that they were built in functions that get automatically called. In the senarios I can't find anything that really triggers them. The last 4 I found near the first few in the ctp2.exe file. It would be great if they were in fact implemented in the game and just happened to not be used in the senarios that came with the game. Guess we'll never know (insert activision whining here)

Locutus
Prince
Apolyton Borg Hengelo/Enschede, The Netherlands
Nov 1999
posted January 24, 2001 10:41   Click Here to See the Profile for LocutusClick Here to Email Locutus  send a private message to LocutusSend a Message to UIN: 52912776 Visit Locutus's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Yes, they are indeed called automatically. I found the last 4 in the ctp2.exe as well but I never got to actually trying them out. Who says we'll never know if they are implemented or not? The only reason I didn't experiment with them yet is because that's only chapter 9 of my SLIC documentation and I'm currently working on chapter 5 I don't need Activision when it comes to SLIC, I can figure it all out on my own just as well (though a little help would make things a hell-of-a-lot easier...)
[This message has been edited by Locutus (edited January 24, 2001).]
Jerk
Chieftain
Green Bay, WI USA
Nov 2000
posted January 24, 2001 16:09   Click Here to See the Profile for Jerk   send a private message to Jerk
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
A little help as to what those functions need, what they do, and what they are supposed to return would be a huge bonus. I suppose one can play around with it and see what it does or what errors it creates.

On another note Locutus, did you see my last post in the creating natural disasters with slic thread?

quote:


Is it possible to access the player built in variables for a civ that is not player[0]? With this quake mod I would like
to message the human player if a quake hits another civilization. Any attempts to do this so far have resulted in slic
syntax or out of bounds errors. To do this I would like to use the results of CellOwner() when its >= 0 like in my
previous post. If I try to use player[tmpCellOwner].country_name I get out of bounds errors. I get a syntax error if
I try player.tmpCellOwner.country_name. forcing player[0] = tmpCellOwner doesnt cause a slic error when it does
player[0].country_name but it also doesn't work (it's not getting set to the country name at all). I am probably
overlooking something simple. Help appreciated.

How does one use the player array in an event for players other than player[0]. Any time I try to use anything other than player[0] I get a slic error that the array is out of bounds.

Dale
Warlord
Melbourne, Australia
Dec 2000
posted January 24, 2001 18:17   Click Here to See the Profile for DaleClick Here to Email Dale  send a private message to Dale
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
What I used to scan through the number of players was a for loop, then a player[1] = command.

code:

for(count = 0; count < NumOfPlayers; count = count + 1) {
player[1] = count;
// this should force player[1] to whatever player you want.
// player[0] I feel should always reference the current player whose turn it is.
}

------------------
Author of Diplomod. The mod to fix diplomacy.

Rommell to a sub-commander outside Tobruk: "Those Australians are in there somewhere. But where? Let's advance and wait till they shoot, then shoot back."
[This message has been edited by Dale (edited January 24, 2001).]
[This message has been edited by Dale (edited January 24, 2001).]

Locutus
Prince
Apolyton Borg Hengelo/Enschede, The Netherlands
Nov 1999
posted January 30, 2001 06:22   Click Here to See the Profile for LocutusClick Here to Email Locutus  send a private message to LocutusSend a Message to UIN: 52912776 Visit Locutus's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
No, I seem to have missed that post, sorry about that. Sometimes I'm so busy with all kinds of stuff I have to leave the forums for a few days and try to catch up on everything when I get back, but when I'm catching up I can't always read through everything very carefully and sometimes overlook a few paragraphs or posts.

Dale is basicly correct, by default most events only give player[0] a value. Some events also use player[1], but if you use higher numbers it's not likely they will contain a valid value. So to use these array-elements, give them a value yourself first. The way you do it, if tmpCellOwner is 7, you try to read player[7] which by default doesn't exist. Like you suggested yourself, the way to get tmpCellOwner in a player variable is 'player[3] = tmpCellOwner;' and then use player[3].country_name where-ever you need it (3 can be any other value as well but I tend to use values that are by default unused - better safe than sorry).
Also, keep in mind that player[0].country_name returns a string and that strings are usually only useful as part of messages (in the textfiles), they can't really be used in other SLIC functions or anything (or at least not officially).

Apolyton Civilization Site Forums
> > > CtP2-Creation Forum

next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | HAC | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War | WesW's Ctp1/2 Site