Thread Tools
Old January 7, 2002, 07:22   #1
odisseus
Settler
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Rome - Italy
Posts: 27
New modder
Hi.

I've just bought CTP2. I'm studying the SLIC language. Wonderful!

I was a modder of Unreal and UT (very different games, indeed).

I enjoy coding very much. As soon as possible i'll try to give my contributions to the modder community.

Long life to CTP2!
odisseus is offline  
Old January 7, 2002, 08:35   #2
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
it's good to have a new modder

it's the big mc here if you need any help just call I will try to help I remember when I first started, not long ago it was a struggle
__________________
"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 January 7, 2002, 10:55   #3
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:01
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Long Life to CTP2!!!!!
Welcome, Odisseus
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old January 7, 2002, 14:15   #4
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: 21:01
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Year, we need more of us, welcome odisseus and long life to CTP2 the real Civ4.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old January 7, 2002, 18:32   #5
odisseus
Settler
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Rome - Italy
Posts: 27
Thanx all!

So ... this is my first questions

First (group of) questions.

How can I manage strings in SLIC? Are there operators like concatenation? All constant screen must be in txt files (in the \gamedata directory)? Are there string variables?

Second group

I want to create an alert window with two choices: OK and Cancel . The alert is activated when I trigger an event (I use the 'pre' option). If I press OK, the event must be processed by CTP code as usual. If I press Cancel the event must not be processed.

What statement I have to use in the 'Cancel' button code?

Bye, and thanx again.
odisseus is offline  
Old January 7, 2002, 18:41   #6
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:01
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Welcome odisseus

Quote:
Originally posted by odisseus
I want to create an alert window with two choices: OK and Cancel . The alert is activated when I trigger an event (I use the 'pre' option). If I press OK, the event must be processed by CTP code as usual. If I press Cancel the event must not be processed.

What statement I have to use in the 'Cancel' button code?
Code:
Kill();
That'll get rid of the message box for you.
Immortal Wombat is offline  
Old January 7, 2002, 21:46   #7
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Ciao, Odessius

Quote:
How can I manage strings in SLIC?
With difficulty. There are no operators for concatenation and neither are there string variables.

Quote:
The alert is activated when I trigger an event (I use the 'pre' option). If I press OK, the event must be processed by CTP code as usual. If I press Cancel the event must not be processed.
As well as the "Kill()" that Immortal Wombat mentioned, if I understand you correctly, I think you need to use the "DisableTrigger" command. But I've never tried disabling an event handler immediately before it was supposed to trigger so I don't know whether that will work or not. How about posting the code here so we can see what you're trying to do?
Peter Triggs is offline  
Old January 8, 2002, 04:37   #8
odisseus
Settler
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Aug 2001
Location: Rome - Italy
Posts: 27
As my very first exercise, i'm trying to implement the following feature.

When I select an opposite unit/army, an alert window must inform me displaying the list of units I'm attempting to attack. Then I have the choice to continue the attack (OK) or not (Cancel).

So, I need to prepare the list of unit in the attacked cell (string concatenation?) and two buttons for the choice (OK and Cancel).

I think that DisableTrigger is the right choice for the Cancel button, but I have to understand when and where enable the trigger again

Looking at all the text/SLIC files, I noticed the presence of lots of strings about PBEM!!!!! Is there a way to enable this kind of MP game?

Bye
odisseus is offline  
Old January 8, 2002, 07:41   #9
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
hi I got something for the msg box its an example of how to use it, it's the first draft of one of my slic just lock it into the scenario bit and load

hope it helps
Attached Files:
File Type: zip give city.zip (1.3 KB, 4 views)
__________________
"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 January 9, 2002, 16:06   #10
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Hmm, as I recall skorpion59, Locutus, and dreamer came up with something quite similar to this in CTP1. Maybe Locutus still has it around. You could check his website. It would be SLIC1 and you'd have to convert it, but it would at least give you something to look at.
Peter Triggs is offline  
Old January 9, 2002, 17:07   #11
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 21:01
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Wow! You've got one hell of a memory, Peter! That was just about the entire 'SLIC group' or whatever we called ourselves in those days (even I had almost forgotten about it's existance). There were 2 other members (MarkH and FinF, I had to dig *really* deep to come up with their names again) but quite frankly, they didn't contribute nearly as much in terms of lines of code (and I don't think they posted in the forums at all, just in email)...

Unfortunately, almost all records of our little group and our SUM mod (SLIC Utility Mod, for those who don't have as good a memory or simply weren't there) were lost in a chain of computer crashes I had a couple of months ago (together with pretty much any other records I had on the 'CtP1 era')

The reason why this same code doesn't exist for CtP2 though, is because as far as I could see, it was not possible to convert this particular feature to CtP2. A few of SLIC1's functions were not transfered to SLIC2 (even though Mr Ogre had promised otherwise - can't really blame him though, he was probably too busy adding new stuff to even notice ). As far as I know, there is no way to detect when a player clicks on an enemy unit or city in CtP2, there is no event that triggers when this happens (CtP1 had a 'clicked' container with variables that acted as events - sounds more complicated than it was ). Odisseus, how were you planning to do this? Maybe I overlooked something, I would very much like to be wrong but I don't think it can be done. Displaying the actual message and buttons and stuff is quite simple, I could easily rewrite that part (or help you write it). But how useful would that be if it's never gonna work anyway?
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old January 9, 2002, 17:38   #12
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 19:01
Local Date: October 31, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
It was one of the first pieces of SLIC I'd seen. I was REALLY impressed.
Peter Triggs 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 15:01.


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