Thread Tools
Old November 20, 2001, 18:13   #1
freestyler
Chieftain
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Aug 2001
Location: England
Posts: 53
Slic So Compicated!!!!!
This kind of message would have probably come up long ago; and from time to time,

"I DON'T UNDERSTAND SLIC"

ive even tried the "getting started with SLIC" by Peter Triggs. but still no help. I have also looked through the god dam Activision help stuff in this Apolyton site.

I mean you see pure modders or should i say SLICers in here doing loads of new SLICs and Mods and its pretty much amazing what you can do with SLIC.

What i'm really loking for is a (any kind) file that edits the AI and makes them sign treaties with each other - you sign a military pact with someone and in no time they want you to attack their enemys (pretty much every civ)

And so far none of these 'Diplomods' have been able to do that

When im looking through SLIC files (trying to learn off them) i see all these 'short words' wich i dont understand.

Whats this abbreviation mean
'int_t'
(yes i dint even know what that is)

i dont know how everyone else find it SOOO easy

WHY IS SLIC SO DIFFICULT TO UN DERSTAND!!!!!!!
freestyler is offline  
Old November 20, 2001, 18:40   #2
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 18:11
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Re: Slic So Compicated!!!!!
Quote:
Originally posted by freestyler
What i'm really loking for is a (any kind) file that edits the AI and makes them sign treaties with each other - you sign a military pact with someone and in no time they want you to attack their enemys (pretty much every civ)

And so far none of these 'Diplomods' have been able to do that
I thought the new version did to some extent? I'm sure Peter or Martin could tell you
Hate to say it, but SLIC can do this easily, if you just want the AI to like each other. To make it have any kind of discretion about who to sign with takes more time.
Quote:
When im looking through SLIC files (trying to learn off them) i see all these 'short words' wich i dont understand.

Whats this abbreviation mean
'int_t'
(yes i dint even know what that is)

i dont know how everyone else find it SOOO easy
Its not easy by any means, and I had tremendous difficulty getting into it. (Search for the number of "SLIC help" threads I started a few months ago )
You're going to hate me for saying this, but it really is a matter of practise, and reading through SLIC coding to see what it does. Most of the MedMod stuff is heavily commented so Wes can understand it so it can be easy enough to look through it, and see things like:
PHP Code:
KillUnit(tmpUnit
and figure out it means that the game kills the unit that is defined as tmpUnit. (temporary unit)

Personally I think the way Wouter and Peter go about explaining it is a little wierd for complete non-programmers, but I haven't got time to do a different explaination.

Basically, I started by reading through the Activision docu, and then figuring the functions. ( I printed out the docu, then read it every time I took a dump. I got to understand the simpler bits of it quite fast that way )
Quote:
'int_t'
int_t is a definer. Note it is always followed by another word, something like 'i' or 'tmpNum' This is how to define a variable.
Code:
int_t tmpNum;
just means that whenever the word 'tmpNum' comes up in the code, the game will know to treat it as an integer.
Unit_t, location_t, army_t all work the same. (with units, locations, armies etc)

SLIC is complex to learn well, but if you can recognise what are the complex bits, and what are the simpler bits, then getting used to it from the bottom up is the way to go. For simple SLIC, avoid Locutus' stuff avoid AI functions (dale's mostly ), avoid Peter's SLIC, because its all cramped and has far too many 'time-saving' functions . Avoid the Alexander scenario.
My first SLIC that worked (just) was the wonderunits code in Cradle, that is entirely based on a few events, and a few simple functions. Martin's slics are fairly simple stuff too, based on one or two events, and a messagebox or so. The Big Mc has just done some simple stuff too, but the layout is a bit dodgy

Anyway, having insulted everyone here I'll close by saying I will do a quick-guide for newbies, based on event-based programming, rather than object-orientated rubbish as soon as I have a spare hour or so. (Maybe Friday/Saturday)

Good Luck, don't get mad.

Ben
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old November 21, 2001, 08:40   #3
kaan
CTP2 Source Code Project
Prince
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Mar 2001
Location: Aarhus
Posts: 333
the main reason SLIC i so hard to learn is that it is a programming language, and as programming languages go its not very elegant eighter. this also explains why SLIC is so powerfull, you can program whole new things with it
i will recoment that you learn the basics of programming in some other language that is well documented and perhaps has a few good introduction texts on how to learn to program.
this might seem like a detour, but if you learn to program in another language first then its much easyer (like in, almost no effort) to learn SLIC.
i will recoment that you start out with Java because the syntax is almost the same as SLIC, the development tools are free to download and a comprehensive guide for complete newbies can be located at suns website

the guide
http://java.sun.com/docs/books/tutor...page-spotlight

now if someone just had a link to a site that has some info on event driven programming

i hope this helps
klaus
kaan is offline  
Old November 22, 2001, 06:53   #4
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
I think I know your problem you have looked at the scenarios from Activision and the amount of text scares you. it's not like that. A bit of slic can be only 5 lines. Keep it simple make small amounts of slic to start with to billed up your confidence ( its how I started with only being able to program in vb) . if you still cant get it to work make a copy of the Activision ones and just alter the lines of code you get to see what line does to the relevant code. You can use this in your own scenario later by implementing the copied lines(the jigsaw and hammer approach).

just Keep it simple

Good luck
__________________
"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 November 24, 2001, 12:39   #5
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 18:11
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
http://apolyton.net/forums/showthrea...threadid=33181

The promised quick-guide

Not perfect, but probably not finished either.
Attached Files:
File Type: zip iw_slic guide v1.0.zip (10.5 KB, 17 views)
Immortal Wombat is offline  
Old November 24, 2001, 14:46   #6
freestyler
Chieftain
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Aug 2001
Location: England
Posts: 53
Wow!!! Theres quite alot of info here, i think i'll go and take a look at it all,

Thanks for the time & effort you put into it,

Cheers!!!
freestyler is offline  
Old November 26, 2001, 12:07   #7
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
just down loaded the slic help file chance is I may find something useful I put this reply up because I don't like downloading stuff without telling the person I will let you know what I think later.
__________________
"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 November 27, 2001, 09:06   #8
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
looked at it it looks interesting found out how to do while coding.

I will look at it when I am stuck but there is still stuff that I am a bit of with. like the mod I made so that the AI gets new armies at the side of there city but it did the other AI too.
__________________
"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 November 27, 2001, 10:38   #9
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 18:11
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by The Big Mc
I will look at it when I am stuck but there is still stuff that I am a bit of with. like the mod I made so that the AI gets new armies at the side of there city but it did the other AI too.
Post the code (copy-paste it in) and we'll see. I suspect its triggering on every AI turn, you'll need to select which AI you want.

if(player[0] == 2) {

or similar.
Immortal Wombat is offline  
Old November 27, 2001, 11:20   #10
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
thanks it's does small bits of codes you don't find in the Activision scenarios.
__________________
"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 November 28, 2001, 07:35   #11
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
I did slic, works good, got to test it like.

I have had a problem with an if to find if player 0 has over 6000. I tried to find the relevent code in the Activision stuff but it's mostly in the msg boxes can you help
__________________
"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 November 28, 2001, 11:57   #12
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 18:11
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Why not to give SLIC advice from school, and the joys of editing posts...
I assume you mean you mean player[0]...

There is no built-in variable for player gold, so you have to use a function:
Code:
if(PlayerGold(player[0]) >= 6000){

Last edited by Immortal Wombat; November 28, 2001 at 13:24.
Immortal Wombat is offline  
Old November 29, 2001, 06:33   #13
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
thanks again.

I normally look at the Activision stuff to see if there is a bit of code to do it I found a small bit but it was in an msg box.

The code is for bank robbery I posted the first go about a month a go and it's a bout time an improved it.
__________________
"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 December 4, 2001, 08:04   #14
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
I made a new bit of slic for barbarians to sell cites see exchange cites and I added a file were I explained what the slic did to all the people who are just starting with slic
__________________
"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 December 4, 2001, 10:30   #15
The Big Mc
CTP2 Source Code Project
King
 
The Big Mc's Avatar
 
Local Time: 17:11
Local Date: October 31, 2010
Join Date: Oct 2001
Location: Of the universe / England
Posts: 2,061
I am looking for how to add slaves to a city there most be some code to do it some where.
__________________
"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 13:11.


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