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 > Yet another grossly unfair SLIC thread
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
Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:17
  Old Post 31-01-2002 23:27 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Yet another grossly unfair SLIC thread Support Apolyton buy from Amazon

quote:
From the SLIC scripting language modification page
SLIC provides direct read-only access to much of the data contained in the game databases. Here is the list of databases than can be used:

[snip]

But it doesn't stop there. Many fields from each database are also accessible. Any bitfield, integer, or floating point value that is in the main body of a record (NOT values in sub-structures!) can be used. Floating point values are multiplied by 100 and converted to ints, since SLIC does not otherwise support floating point variables.

Examples:
tankAttack = UnitDB(UNIT_TANK).Attack;
costOfAdvInfantryTactics = AdvanceDB(ADVANCE_ADV_INFANTRY_TACTICS).Cost;
minimumHappinessForDefaultStrategy = StrategyDB(STRATEGY_DEFAULT).MinimumHappiness;

Please explore the database text files to see what data you might be interested in. There are far too many fields available to enumerate here.

Has anyone had any luck using these? Because I tried using things like that for some SLIC a while ago, and it didn't work. If they can be accessed, then GovernmentDB(GOVERNMENT_MONARCHY).MaximumCityLimit (for example )could come in very handy...

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:17
  Old Post 31-01-2002 23:41 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Lose 30 kilos (of popups)

I think that is *exactly* what you're looking for (that was actually what I was going to suggest in my email but you beat me to it ). I know it works well with (at least some) entries from units.txt (used it for the unit repair code in the MedMod) but I haven't tested it for the governments...

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:17
  Old Post 22-02-2002 06:54
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Lose 30 kilos (of popups)

Argh!!! I've just spent six or seven hours sorting out a bug. Here's the source:

quote:

int_t denotes an integer argument that corresponds to a player. Ints and players are mostly interchangeable in SLIC, they are listed specially here for clarity.



"mostly"!!! Never had any problems with this before (well, I think so but now I'm a bit worried). But here's a context where ints and players are not interchangeable:

[code]

trigger 'HumanAcceptsAICounter' on "DipWizard.ViewButtons.AcceptButton" when (AI_COUNTER) {

//stuff

}

If you try to use "player[0]" and "player[1]" in here, nothing happens. Nothing. No error messages, just nothing. Replace them with int_t types (or, hmm, I suppose "player[0].owner" and "player[1].owner") and it works. Makes me wonder where else they're not interchangeable.

BTW, in a quote above in this thread, Joe said:

quote:

Any bitfield, integer, or floating point value that is in the main body of a record (NOT values in sub-structures!) can be used.


I've never managed to get anything except integers. Anybody else had any luck on this?

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:17
  Old Post 22-02-2002 19:11 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by Peter Triggs
I've never managed to get anything except integers. Anybody else had any luck on this?

No, not at all.
Its annoying about the substructures as well. It renders most of the tile improvement data useless, as its all sub-grouped by terrain.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:17
  Old Post 22-02-2002 19:39 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Browse Apolyton AD-FREE

When I was making the Tile Improvement Rush Option code for Sir Ralph, I found that the CreateImprovement event triggered once or twice at the beginning of every turn. And it seems the improvement created is #1. In the normal game: an Advanced Mine (or two, I forget).

I had to re-order the tileimp.txt so that a dummy TI was #1, then set the code not to trigger on CreateImprovement(1,xy,1,0);

Wierd. And why is the last number always 0?

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:17
  Old Post 23-02-2002 04:53 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, buy GURPS/ Alpha Centauri

That's very...interesting, Peter. I will certainly look into that in more detail at some point.
No, I haven't been able to get non-integer values from the database either.

Ben,
Aha, I was wondering where that check for value[?] == 1 (or whatever it was) was for, thanks for clearing that up.
I'm doing this from the top of my head but usually the last argument of an event indicates a reason (why does the event take place?). It can have any value, won't affect the game one bit AFAIK (but 0 is a nice safe number, better not take any risks - after all, it's still SLIC).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:17.
Apolyton Time is 00:17.
    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.0296 seconds (86.04% PHP - 13.96% 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