Thread Tools
Old March 4, 2003, 12:16   #1
Azulthar
Settler
 
Local Time: 21:56
Local Date: November 1, 2010
Join Date: Mar 2003
Location: Amersfoort
Posts: 3
Immediately showing Great Library link for advance breakthrough
Hi,

What I'm trying to do is whenever you gain an advance, the Great Library entry for that advance will automatically pop up. However, I can't seem to find an event that is related to the discovery of a new advance.

Is there such an event, should I try a different approach or is it simply impossible?

(My goal with CTP2 is to mod it so it plays more like Alpha Centauri).


- Azulthar
Azulthar is offline  
Old March 4, 2003, 12:39   #2
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: 22:56
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
The GrantAdvance event is the event on that you need to use in the event handler, the LibraryAdvance function is needed to open the Great Library.

Code:
HandleEvent(GrantAdvance)'MG_ShowAdvance'post{
    if(IsHumanPlayer(value[0])){
         LibraryAdvance(value[1]);
    }
}
Let's hope value[1] is the database index of the advance in question. The whole code just needs to be copied into a slic file that is already recognized by the game and of course if you add it to an already started game you have to /reloadslic. To do it just open the chat screen by typing the apostrophe key (') and enter: /reloadslic

Disclaimer: The code is untried, untested, might be buggy.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old March 4, 2003, 15:41   #3
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 20:56
Local Date: November 1, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Actually, value[0] is the AdvanceDB index. This works fine:

Code:
HandleEvent(GrantAdvance)'MG_ShowAdvance'post{
    if(IsHumanPlayer(player[0])){
         LibraryAdvance(value[0]);
    }
}
Peter Triggs is offline  
Old March 5, 2003, 05:24   #4
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 20:56
Local Date: November 1, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
Azulthar

Nice to see a new face

What parts of alpha century do you want to convert to ctp2?
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc is offline  
Old March 5, 2003, 08:02   #5
Azulthar
Settler
 
Local Time: 21:56
Local Date: November 1, 2010
Join Date: Mar 2003
Location: Amersfoort
Posts: 3
Thanks all.

The Library entry pops up, but it's always showing the same entry (adv. military tactics). I've experimented a bit with the values but I can't remember if I tried value[0] is an argument. I will try it right now and let you know if it works.

The Big MC:
Not the graphics or the setting or anything like that. It's more the level of detail that AC had that appeals to me.

I'd also like to have just a few unique civs instead of the large number you get now (but all play the same). The first step towards this is to remove the random advances gained at the start of the game and then give some based on your civ. Hope this can be done.

*added*
Well, value[0] works! Then again, you already mention this in your post...

Last edited by Azulthar; March 5, 2003 at 08:32.
Azulthar is offline  
Old March 5, 2003, 08:33   #6
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 20:56
Local Date: November 1, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
Very easy all you need to do is edit a file and no one will get the advances.

Alternately just put some slic together to remove the advances when the game begins.
__________________
"Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
The Big Mc 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 16:56.


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