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 > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Can anyone explain the mod_functions?
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Jerk is offline Jerk
Chieftain
Green Bay, WI USA
Nov 2000
time: 23:14
Post  Old Post 23-01-2001 00:01
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Can anyone explain the mod_functions? Support Apolyton buy from Amazon

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 is offline heardie
Prince

Aug 1999
time: 15:14
Post  Old Post 23-01-2001 11:17
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

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 is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:14
Post  Old Post 23-01-2001 18:01 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
Put an end to popups!

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 is offline Jerk
Chieftain
Green Bay, WI USA
Nov 2000
time: 23:14
Post  Old Post 24-01-2001 14:53
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Tired of ads?

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 is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:14
Post  Old Post 24-01-2001 20:41 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

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 is offline Jerk
Chieftain
Green Bay, WI USA
Nov 2000
time: 23:14
Post  Old Post 25-01-2001 02:09
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Lose 30 kilos (of popups)

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 is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:14
Post  Old Post 25-01-2001 04:17
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

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 is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:14
Post  Old Post 30-01-2001 16:22 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Suffering from ads?

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).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:14.
Apolyton Time is 00:14.
    top of page
Rate This Thread:
archivepost
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.0307 seconds (87.21% PHP - 12.79% MySQL) with 31 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