January 7, 2001, 01:55
|
#1
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
For Locustus or Others
Ok, I have ideas for several new City Improvements, Advances, and Wonders and I would like to know if any of the following effects or factors need to use SLIC. I'm hoping no for all of them, since I have almost no computer programming knowledge. Locustus, hope you read this.
NEW CITY IMPROVEMENTS
Baron's Manor: 15% decrease in Food consumption and -2 in Happiness
Question: Can I increase/decrease Food consumption with just the text files like I can with Growth, Gold and others?
NEW WONDERS
Grand Canal: +5 Gold for all River tiles
Question: Does this require SLIC at all - I don't think it does, but want to make sure.
The Covenant: raises national loyalty in Monarchy and Republic governments from Indifferent to Loyal
Question: Does this require SLIC at all?
Luther's 95 Theses: causes all cities with no Basilica in all nations to riot for 5 turns
Question: Again, does this require SLIC?
The Copernican System: free University in every size 10 city of host civilization
Question: I wouldn't think this requires SLIC, but not sure?
Galileo's Pump: 50% decrease in production cost for Ship of the Line units and 25% decrease in costs to place Mines tile improvements
Question: Does this require SLIC?
Decree of Revolution: under all government types except for Republic, Democracy, and Virtual Democracy, all size 5 cities in every nation except host civilization will revolt
Question: Does this require SLIC?
Darwin's Theory: gives 2 free scientists in every size 10 city in every nation
NEW ADVANCES
Castle Construction: FOW effect of permanent 15% increase in Production, and 15% increase in Defense for all units Fortified in cities until discovery of Cannon Making
Question: Does the increase in Defense until Cannon Making require SLIC?
Steam Engine: FOW effect of +5 Gold in all River tiles for 25 turns
Question: Does this require SLIC?
Crusades: FOW effect of 50% decrease in Production costs for Knights and Pikemen for 30 turns
Question: Does this require SLIC?
Mass Mobilization: FOW effect of +1 movement points for all armies of 6 stacked units or more, and permanent 15% reduction in costs to place Road tiles on all Terrain
Question: Does this require SLIC?
Map Making: FOW effect of 25% reduction in costs to place Fortification tile improvements on all Terrain for 35 turns
Question: Does this require SLIC?
Federalism: FOW effect of 50% reduction in placement of Advanced Farms tile improvements for 50 turns, and free placement of Railroads tile improvements on all Terrain except: Mountains, Jungle, Forest, Swamps, Tundra, and Glacier for 50 turns
Question: Does this require SLIC?
|
|
|
|
January 7, 2001, 02:34
|
#2
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
-
|
|
|
|
January 7, 2001, 09:55
|
#3
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
MrFun,
Don't worry, I read (almost) everything in the Creation forum eventually (though when I have little time it may take a few days)
Baron's Manor: won't work in SLIC so you'd better hope it works without it  (I think it does).
Grand Canal: Requires SLIC but it's fairly easy to do.
The Covenant: Hmmm. If it's possible at all it will require SLIC (you'd need to change government through SLIC without having a period of anarchy, not quite sure if it's possible). If it's possible, it shouldn't be too hard.
Luther's 95 Theses: requires SLIC
The Copernican System: AFAIK it requires SLIC, you can give Unis to all cities in text-files but I don't think you can make it depend on size. This too is fairly easy to do in SLIC.
Galilieo's Pump: SOL part requires SLIC, mines might not be possible at all, but I'm not sure. The SLIC part is fairly easy, but figuring out if mines work might require some expermenting.
Decree of Revolution: requires SLIC. Not too tough to code either.
Darwin's Theory: Needs SLIC, and it might be tricky too (you would somehow have to force these scientists to stay scientists and not become part of the regular population, working on the fields or whatmore). I think it's doable but I'm not quite sure. Unless this one's really important for you it's probably not worth the effort though...
Advances Part: I'll go through these some other time (got other things to do right now), but they look like they all require SLIC and some of them will still be impossible or at least difficult to do.
|
|
|
|
January 7, 2001, 14:33
|
#4
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Thanks Locustus - you're a real pal.
I understand you have other things to do, so I will keep a lookout for when you have time to comment on the advances.
Now, it's a matter of locating the SLIC files. But I do not have a clue as to what codes I would need to type for those you said that it would be simple to do.
Pretend I'm blonde for now even though I'm dark hair.
|
|
|
|
January 7, 2001, 15:22
|
#5
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Locustus, I went to check out a SLIC file, but then I am asked by my computer "what program do I want to open the file with?"
So what program do I use to open a .slc file?
|
|
|
|
January 7, 2001, 17:14
|
#6
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
I'll see if I can give you some example code later this week, MrFun.
You can open SLIC files in any text-editor but personally I worship EditPlus, a extremely flexible and custumizable shareware text-editor which I use for all my programming. I even have files for it that allow syntax highlighting and auto-correction for SLIC II (though not 100% SLIC II compatible yet, haven't had time to update them), which make life a lot easier for any SLIC programmer. I already 'converted' Harlan into using EditPlus, now the rest of Apolyton  If you want the files and instructions on how to use them, I can email them (they're on my website as well, but those are for SLIC1 and thus very obsolete), I'll see if I can update those too one of these days.
|
|
|
|
January 8, 2001, 01:29
|
#7
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Hey thanks again Locustus.
I will check out this text editor thingy and bookmark the website from your link.
|
|
|
|
January 8, 2001, 18:33
|
#8
|
Warlord
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Jul 1999
Location: The Mountain Empire
Posts: 185
|
"Locustus"
Man oh man.. funny!
------------------
'Blood will run'
|
|
|
|
January 8, 2001, 22:45
|
#9
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Ok, it was a typo - but I do NOT need Hooked on Phonics!
Sorry about that Locutus.
|
|
|
|
January 8, 2001, 22:49
|
#10
|
Warlord
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Jul 1999
Location: The Mountain Empire
Posts: 185
|
BTW Mr Fun, I think your ideas for improvements and all are very good and original! I like the Grande Canal especially!
Maybe "covenant" could be "Magna Carta"? Seems like the right time period you have in mind for that.
------------------
'Blood will run'
[This message has been edited by Savant (edited January 08, 2001).]
|
|
|
|
January 9, 2001, 05:06
|
#11
|
King
Local Time: 10:56
Local Date: October 31, 2010
Join Date: Sep 1999
Location: Cannes, France
Posts: 1,336
|
Locutus,
If you want I could update editplus files (.stx, .acp and .ctl) to use with SLIC 2. I already did it for slic 1. Could you send to me those files, so I could
merge it with the files I already made ?
|
|
|
|
January 9, 2001, 11:40
|
#12
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
I don't see what was so wonderful about the Magna Carta. If you know the history of it, you would realize that it gave extended rights and priveleges to the upper class and nobility.
After the Magna Carta came into effect, the peasant and middle classes actually had it worse!
|
|
|
|
January 9, 2001, 12:16
|
#13
|
Warlord
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Jul 1999
Location: The Mountain Empire
Posts: 185
|
I'm not extolling the virtues of the MC here Rich, rather just seems as a wonder most congruent with the idea of "covenant", especially given the time frame it would appear you mean for that wonder to be available.
It was after all, a covenant of sorts, between the two powers of any significance at the time - king and nobles.
------------------
'Blood will run'
[This message has been edited by Savant (edited January 09, 2001).]
|
|
|
|
January 10, 2001, 00:44
|
#14
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
I see your point now Sevant, and by the way - I'm not rich - just a university student living on modest financing.
|
|
|
|
January 11, 2001, 14:59
|
#15
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
MrFun,
Silly thing here is that you're asking me if this is possible without SLIC, while I only know a lot about how to do it *with* SLIC, so it's possible that I'm wrong on one or two occasions, but no more than that: I'm fairly familiar with the text files as well (most of them anyway).
Castle Construction: Yes, and it would probably be a fair amount of work to code in SLIC.
Steam Engine: AFAIK not possible at all. No wait, I take that back. Probably possible but a lot of coding required.
Crusades: Yeah, think so. Not too tough to do either.
Mass Mobilization: Requires SLIC. Movement thing is fairly easy, roads thing is a bit tougher but probably possible.
Map Making: Yes, very similar to roads thing from above.
Federalism: Yes.
Coding suggestion:
+x Gold for this or that TerrainType/River. This doesn't take into account the fact that a square might not get worked fully, this would be much more complicated, if possible at all. Would be too much work for me to look into that now. I'll see if I have some more code later.
HandleEvent(BeginTurn) 'MoreGold' post { // triggers at beginning of every turn
int_t amount;
int_t tmpPlayer;
tmpPlayer = player[0];
if (canGiveGold) { // set this to 1 whenever it should be executed (after making FOW, always, etc)
amount = 5 * CountRivers(tmpPlayer); // player gets this many gold per river in city radius
AddGold(tmpPlayer, amount); // give player gold
}
}
int_f CountRivers(int_t thePlayer) { // return the number of river tiles that's in any tmpPlayer's city's radius
location_t tmpLoc;
location_t tmpLoc2;
city_t tmpCity;
int_t i;
int_t x;
int_t y;
int_t number;
int_t radius;
int_t tmpPlayer;
tmpPlayer = thePlayer;
number = 0;
for (i = 0; i < Cities(tmpPlayer); i = i + 1) { // cycle through all cities
GetCityByIndex(tmpPlayer, i, tmpCity); // get city and put it in tmpCity
if (tmpCity.population < 7) { // find city radius and store it in radius
radius = 1;
} elseif (tmpCity.population < 19) {
radius = 2;
} elseif (tmpCity.population < 33) {
radius = 3;
} else {
radius = 4;
}
tmpLoc = tmpCity.location; // temporary put location here, so you can get coords
for (x = (tmpLoc.x - radius); x <= (tmpLoc.x + radius); x = x + 1) { // e.g. for size 4 city, make x go from city.x - 1 to city.x + 1
for (y = (tmpLoc.y - radius); y <= (tmpLoc.y + radius); y = y + 1) { // make y go from city.y - radius to city.y + radius
MakeLocation(tmpLoc2, x, y);
if (SquaredDistance(tmpLoc, tmpLoc2) <= ((radius + 1) * (radius + 1) - radius) { // make sure it falls withing radius, long story but do the math and see how it fits
if (HasRiver(tmpLoc2)) { // if falls in city radius and has a river, add gold
number = number + 1; // this is a river within city radius, so gold should be added here
}
}
}
}
}
}
|
|
|
|
January 11, 2001, 18:21
|
#16
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Look what you made me get into Locusus!  just joking
But I felt a little overwhelmed or discouraged when I read the codes you posted for some of my ideas. Nevertheless, I am going to study what you have posted here so far and look at the SLIC documents now that I have the text editor you suggested.
Thanks for your help thus far, and let me know if you would want me to create any Great Library text for any part of your mod(s).
I will let you know how my comprehension on SLIC is coming along.
|
|
|
|
January 13, 2001, 09:19
|
#17
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
Yes, I agree this particular code looks overwhelming (esp. since I screwed up the layout but am too lazy and busy to fix it  ), but most of the coding should he relatively simple.
You're too late with your GL proposition, I already have Wes & Harlan working for me  Once that work slows down I'll have more time for helping people like you (don't even need anything in return), but that'll be a while...
|
|
|
|
January 13, 2001, 12:19
|
#18
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Damn - and I enjoy making original Great Library text.
Oh well, maybe in the future I'll find an opportunity to reciprocate.
|
|
|
|
January 14, 2001, 06:03
|
#19
|
Chieftain
Local Time: 09:56
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Mazamet, France
Posts: 32
|
I have a question about SLIC
I would like to add a new feature in my mod (suggested buy someone else here) : you can build some units only if you have a specific building in the city (for instance, you can build cleric only with a Shrine).
In the Alexander scenario, there is some code where they prevent some units building in some specific cities.
How could it be changed to make it work without recording the city location first?
How could I test if a building exists in this city?
|
|
|
|
January 14, 2001, 07:20
|
#20
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
That's an easy one, can write that one in 30 seconds  (Usual disclaimer: not tested, could contain typos or other minor bugs)
edit: ) added where needed
Code:
|
int_f mod_CanCityBuildUnit(city_t theCity, int_t theUnit) {
if (theUnit == UnitDB(UNIT_ARCHER)) {
if (CityHasBuilding(theCity, BuildingDB(IMPROVE_GRANARY))) {
return 1; // can build this
} else {
return 0; // can't build this
}
}
if (theUnit == UnitDB(UNIT_TANK)) {
if (CityHasBuilding(theCity, BuildingDB(IMPROVE_FACTORY))) {
return 1; // can build this
} else {
return 0; // can't build this
}
}
return 1; // can build all other units
} |
[This message has been edited by Locutus (edited January 17, 2001).]
|
|
|
|
January 14, 2001, 08:03
|
#21
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
MrFun,
Check out the new documentation for feat.txt and the like. That might give you some good ideas for feats. I didn't look into it too closely yet but it looked like there were some things in there I for one didn't knew were possible.
|
|
|
|
January 14, 2001, 12:07
|
#22
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Ok Locusus - will do!
|
|
|
|
January 16, 2001, 16:27
|
#23
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
I've been studying the SLIC guides on the Apolyton website and I THINK I am understanding more of it.
I also LOVE the text editor you pointed out, Locutus. I ended paying for the official registration.
|
|
|
|
January 16, 2001, 18:09
|
#24
|
Chieftain
Local Time: 09:56
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Prince of the Barbarians
Posts: 0
|
How will the AI handle this? Will it understand that a particular building must be built first? Or will it get stuck in a loop trying to repeatedly pick the same unit to build?
For those that try this before I have a chance to, beware the missing ")"s on the CityHasBuilding lines. I havent figured out SLIC yet, but i do know you have to pair off all the open "(" or "{". If they arent you get a SLIC error. Yes, I found this out the hard way
------------------
History is written by the victor.
|
|
|
|
January 17, 2001, 06:44
|
#25
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
AW,
Don't worry, the AI can deal with this just fine. The way you should look at it is that this function makes that the unit types that can't be built don't even show up in the buildlists the AI chooses from (so it kind of temporarily modifies the file UnitBuildLists.txt in-game), so if the Tank isn't available the AI won't even know it exists (or at least not in that particular city, in the Alexander scenario this stuff varies per city: some cities can build Hoplites, others can't).
The only thing to keep in account here is that the buildlists need to be adapted so that it builds certain buildings earlier to get access to all units.
(BTW, fixed the (-problem, thanks for pointing that out, I always screw those up)
MrFun,
It's very good to hear you're beginning to learn SLIC (don't hesitate to ask me if you have any questions, but I'm sure you won't  ) and it's particularly good to hear you liked EditPlus so much. I'd pay the registration fee myself if I'd have the money (and as as soon as I can afford it I probably will), but for now I'm just a chronically broke student who can barely pay his bills as it is  Then again, if you realize that I probably introduced EditPlus to a several dozen people already and at least three of them ended up registering, the people of EditPlus ought to be paying me for my promotional work
|
|
|
|
January 17, 2001, 11:49
|
#26
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Locutus, I will make the placard signs, and you and I can organize a picket at the company's building.
|
|
|
|
January 17, 2001, 14:48
|
#27
|
Chieftain
Local Time: 09:56
Local Date: October 31, 2010
Join Date: Feb 2001
Location: Prince of the Barbarians
Posts: 0
|
I was hoping thats how it would work. I'm good at finding syntax errors, but its when it "looks" right and still doesnt work that I get confused. I'd never have figured out the barracks bug because it all looked like valid code to me. But I'm learning...ssslllooooowwwwwlllllyyyyyyyyy
------------------
History is written by the victor.
|
|
|
|
January 18, 2001, 09:14
|
#28
|
Deity
Local Time: 11:56
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
|
MrFun, sounds like a good plan, count me in
|
|
|
|
January 18, 2001, 23:46
|
#29
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Hey Locutus, I found what seems to be a great deal for an impoverished university student like you or me.
On Amazon.com, there is a price of $43 for Corel Photo-Paint 9.0! I read the customer reviews, and based on the pros and cons, it LOOKS like it MIGHT be a good buy for altering CTP II graphics and creating new ones.
But I have one question that the reviews did not have any comments on - do you know if this program will allow me to open and edit .tga graphics?
If you do not know, I will try to look again for the answer to my question. thanks
|
|
|
|
January 19, 2001, 11:00
|
#30
|
Emperor
Local Time: 04:56
Local Date: October 31, 2010
Join Date: Nov 2000
Location: Illinois
Posts: 8,595
|
Never mind about that - it is used mostly for digital camera owners. oh well
|
|
|
|
Posting 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
|
|
|
All times are GMT -4. The time now is 05:56.
|
|