 |
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:30
|
|
quote: Originally posted by Adriano
You got it.
It's in the root. |
Wel, thanks, but I don't see it In the root there are only 6 files: index.html, two versions of links.html, a no-CD crack, a Readme file and a Habsburg scenario. I can't find it in any of the subdirectories either, what did you call the file?
quote: I'm a little bit confused.
Could you clarify if Ages of Man has an improved CTP2 code? |
It's supposed to get a custom version of the source code project build, but I believe there are some problems in finishing that up, so that might end up only being released as a patch, after the initial release.
Not that it matters much, most of the gameplay improvements are in the SLIC code, not the source code.
|
|
|  |
 |
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:30
|
|
Re AOM,
The source code changes have hit a snag, mainly to do with the source code being the non patched version of CTP2. They were only cosmetic anyway, removing access to cheat mode from within game, making wonders appear on top of roads and naming the King unit.
If the problems are sorted out, they will follow as a patch.
Otherwise, everything re gameplay as advertised is in, including the withdraw code that works, removing 3 units a turn if a withdrawal agreement is in place for the required 5 turns.
|
|
|  |
 |
|
Adriano
|
|
Ok...now I can see the file in your root directory.
Could you check it?
|
|
|  |
 |
|
Adriano
|
|
No!
When I close FTP voyager and then I reconnect I can't see no more the file in your directory...
I really don't know why..
|
|
|  |
 |
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:30
|
|
quote: stankarp,
did you try adding these has options in the source code project?
|
I have not had anything to do with the source code project, had enough on my plate with AOM.
Fromafar tried AOM on the source code build but was having major problems as it (the source code) is the un patched version. The patch apparently is required to activate certain slic functions. Everything in AOM is in Slic.
|
|
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:30
|
|
quote: >
if(IsHumanPlayer(player[0])){
Same problem as before. The playtest release will NEVER execute the
if-branch.
player[0] is invalid, and will be replaced with 0 (playtest release) or a random value (Activision). You may actually get lucky, because the city[0].owner from the
previous statement is still on the stack, and it will seem to work as designed. But when you add some other unrelated statement in between, it may suddenly fail.
Email from Fromafar;
|
I think this the main problem he alluded to. AOM Slic code and other mod code is full of :
if(IsHumanPlayer(player[0])){
Also, with debugslic on yes, every array (none of which I created) returns an array index out of bounds error when you actually start doing things in a game. No error during load and start game, only when you actually start moving things.
I check my code with debugslic on yes, then switch to no for actual playing (but found I was getting the same error messages during load up with debugslic on either yes or no.
|
|
|  |
 |
|
Adriano
|
|
quote: Originally posted by Locutus
I think the problem is that the 250free site just doesn't accept files that large. I tried setting up an FTP elsewhere that *could* handle the file but no such luck unfortunately.
|
The strange thing was that the uploading process seemed to me normal, and, futhrermore I saw in your directory another sound file of 28Mb.
Anyway I'll go ahead with the splitted file.
I't s incredible that CTP2( and the fullcolored and neverforgotten CTP1!) after 5 years is still "catalysing" so much interest.
IMHO the original activision was a very ambitiuos and great project but the realization was very very weak.
I played Cradle (in my opinion the best mode) and , in spite of several improvements, is far to be CTP2 as could be.
When I saw the source code project I realized that the only way to have an hand made CTP3 (OR CTP2 AT HIS BEST). The only way to have, definetly, an AI exploiting the infinite strategic possibility provided by the game.
Probably It could be useful to understand, not only for me, what It could be done VIA SLIC and what It could'nt
I know here there are many pages dedicated to this argument, but occasional visitors, like me, need to have syntethic informations
Thank you in advance.
|
|
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:30
|
|
quote: Originally posted by Adriano
The strange thing was that the uploading process seemed to me normal, |
Well, you first have to upload a file before a site can know how large it is. So uploading will work fine, but afterwards you should get an error message. Apparently the FTP client you use doesn't translate that error message properly (FTP is actually a text-only interface; if you use a fancy graphical interface (which you probably do, everyone does) that's basically just a user-friendly 'skin' over the 'real' protocol. Some skins don't 'translate' all incoming text-messages properly (in part because they're not always standardised)).
quote: and, futhrermore I saw in your directory another sound file of 28Mb. |
Yes, I can see how that might be confusing. But that is because their policies have changed considerably over the years...
quote: I't s incredible that CTP2( and the fullcolored and neverforgotten CTP1!) after 5 years is still "catalysing" so much interest. |
Yes, that is almost unprecedented (Civ2 being the only other game I know of). Quite amazing indeed, but it's all thanks to the geniuses at Activision for making this game so moddable 
quote: When I saw the source code project I realized that the only way to have an hand made CTP3 (OR CTP2 AT HIS BEST). The only way to have, definetly, an AI exploiting the infinite strategic possibility provided by the game.
Probably It could be useful to understand, not only for me, what It could be done VIA SLIC and what It could'nt
I know here there are many pages dedicated to this argument, but occasional visitors, like me, need to have syntethic informations
Thank you in advance. |
If it's AI modding you're interested in, SLIC is not the best place to start. You *can* do a lot of good work with SLIC, but you will want to start by looking into the regular AI files (in the aidata folder). See the AI and Diplomacy section of the topped Resources for modmakers thread for a start. If you have specific questions or anything like that, best to start a new thread for that. We're already hi-jacking stankarp's thread enough as it is...
|
|
|  |
 |
|
Fromafar
|
|
quote: Originally posted by Martin Gühmann
But that isn't a problem of the Playtest only.
|
In a way, it is. After having encountered some crashes, I have changed the playtest to return 0 when accessing an invalid reference, rather than the value of an uninitialised variable. But it may be that the uninitialised variable actually had a "correct" value, due to the particular order of Slic statements. As an example, assume you have the following code in a Slic handler that has city[0], but does not have player[0].
code: player[0] = city[0].owner;
if (IsHumanPlayer(player[0]) ...
You will get 2 Slic errors on execution, because index 0 is out of bounds in the player array. The assignment in the first line will fail, but the Activision version may just have stored the evaluated city[0].owner value in the variable that is being accessed when evaluating player[0] in the condition. Everything seems to work as designed, the Mod maker is happy, and tells you to always run with DebugSlic off to suppress the warnings . And warns you not try to modify this code at home. When you insert another statement between the 2 lines, it suddenly may stop working as intended, and may even cause a crash to desktop (though probably not with this particular example).
With the playtest release, the condition will never be executed, because the invalid player[0] reference is replaced with 0 (= barbarians, when interpreted as a player).
Of course, the best solution is to correct the Slic code and use
code: if (IsHumanPlayer(city[0].owner) ...
or store the city[0].owner value in some other variable.
|
|
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:30
|
|
"if (IsHumanPlayer(city[0].owner)"
Ok, that solution is Ok for that particular case, but what do you do where:
"if (IsHumanPlayer(player[0])}"
Is used so that a code only executes once a turn.
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:30
|
|
quote: Originally posted by Fromafar
In a way, it is. After having encountered some crashes, I have changed the playtest to return 0 when accessing an invalid reference, rather than the value of an uninitialised variable. But it may be that the uninitialised variable actually had a "correct" value, due to the particular order of Slic statements. As an example, assume you have the following code in a Slic handler that has city[0], but does not have player[0].
code: player[0] = city[0].owner;
if (IsHumanPlayer(player[0]) ...
You will get 2 Slic errors on execution, because index 0 is out of bounds in the player array. The assignment in the first line will fail, but the Activision version may just have stored the evaluated city[0].owner value in the variable that is being accessed when evaluating player[0] in the condition. |
That's indeed a serious problem, because the mods are full of them. And you can't do some certain things:
code:
player[0] = city[0].owner;
PW = player[0].publicworkslevel;
Assume again the event has a city parameter but no player parameter. As there is no other way to retrieve the player's public works level. This doesn't work and therefore my City Capture Options script is broken. At least I was able to assume that this works at least. Of course the intendet solution is that the array is filled.
quote: Originally posted by Fromafar
Everything seems to work as designed, the Mod maker is happy, and tells you to always run with DebugSlic off to suppress the warnings . And warns you not try to modify this code at home. When you insert another statement between the 2 lines, it suddenly may stop working as intended, and may even cause a crash to desktop (though probably not with this particular example). |
Actual I did a lot of work to get rid of all the DebugSlic = Yes errors in GoodMod so that GoodMod is indended to be played with DebugSlic = Yes. And I was also aware of this problem so that I could code it in that way.
quote: Originally posted by Fromafar
Of course, the best solution is to correct the Slic code and usecode: if (IsHumanPlayer(city[0].owner) ...
or store the city[0].owner value in some other variable. |
Well that's right for code that is intended to work on the Activision versions. But I consider this forgetting of the value of the built in arrays as bug.
quote: Originally posted by stankarp
"if (IsHumanPlayer(city[0].owner)"
Ok, that solution is Ok for that particular case, but what do you do where:
"if (IsHumanPlayer(player[0])}"
Is used so that a code only executes once a turn. |
Actual it isn't used so that the code only executes once a turn it is used so that the code only executes if the player is human. 
So now to the question if the event that your event handler triggers on has a player, no problem. Otherwise you always has something like this before:
code:
player[0] = something_that_represents_an_player_index;
So all you have to do is to replace player[0] by the variable that is right of the assignement.
And if you need something I described above you have to refill the player[0] again right before you have to use it of course in the Activision versions.
-Martin
|
|
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:30
|
|
Clarification:
"code only executes once a turn."
Means once in total in a turn, rather than once in each players turn.
IW wrote a short peice of code for me that I expanded on but rather than run it once for each player, he used :
"if (IsHumanPlayer(player[0])}"
so it runs only once in a full turn (ie, full turn = all player moves).
Returns no slic errors with debugslic on yes, and
no noticeable problems if played with debugslic on no.
|
|
|  |
 |
|
stankarp
|
|
australia
Feb 2002 time: 05:30
|
|
"PW = player[5].publicworkslevel;"
I had a major problem with the supply code for the human in AOM, at one stage about turn 150-200, the human started getting an AI players PW cheat. At Peter Triggs' sugestion, I changed a player[5] reference used in the code and the problem stopped.
|
|
|  |
 |
|
Fromafar
|
|
OK, I probably should have worded this better in my post. "city[0].owner.publicworkslevel" is invalid as Slic code. It was not intended to denote actual code, but rather to express that you might still get the actual value of the public works of city[0].owner, even when using completely unrelated indices in the 2 statements.
|
|
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:30
|
|
quote: Originally posted by Fromafar
The virtual .ldl file problems are real enough to crash my AOM test setup. |
Well obviously we got two different sets of altered *.ldl files for AOM, I just got a controlpanel.ldl. And with just this files a lot of these *.ldl problems seems to be virtual. But for the future mention the mod for that you do such *.ldl fixes.
quote: Originally posted by Fromafar
And I intend to change the source code to make the mods work again. I don't have the original versions installed at the moment, so I would like someone to report what the results of the tests in my earlier posts are. We can not rule out the possibility that the original Activision version(s?) actually contained assignable arrays. This would be a better design, but probably more difficult to implement than just restoring the read from random memory and hope for the best. Like the above, I have only "fixed" this because I got an actual crash in a test game. |
It seems the problem is more complicated. But first some test code:
code:
HandleEvent(ArmyClicked)'MG_TestSomething'pre{
player[3] = army[0].owner;
int0 = player[3].publicworkslevel;
int1 = g.player;
int2 = player[3].publicworkslevel;
player[5] = player[3];
int3 = player[5];
int4 = player[3];
int5 = player[4];
if(player[3] == player[5]){
// AddEffect(army[0].location, "SPECEFFECT_FIRES", "SOUND_ID_PILLAGE");
}
if(army[0].owner == army[0].owner){
// AddEffect(army[0].location, "SPECEFFECT_UNHAPPINESS_SEA", "SOUND_ID_EXPLOSION_LAND_1");
}
if(int3 == int4){
// AddEffect(army[0].location, "SPECEFFECT_DIPLOMATIC", "SOUND_ID_EXPEL");
}
int6 = GetNearestWater(army[0].location, army[0].location);
int7 = player[5].publicworkslevel;
int_t i;
for(i = 0; i < 10; i = i + 1){
Event:CreatedArmy(army[0]);
// AddEffect(army[0].location, "SPECEFFECT_UNHAPPINESS_SEA", "SOUND_ID_EXPLOSION_LAND_1");
}
int8 = player[5];
int9 = player[3];
MessageAll('MGMAETestMessage');
}
The int1 to int9 are global int_t's and MGMAETestMessage is a message box that displays all these intXs actual I can go to int30.
First observation: Doing something like this: int8 = player[88]; produces an indix out of bounce error if there was nothing assigned to the array by using a higher index than 88. That holds for version 1.0 and version 1.1.
Second observation all the statements like intX = player[X]; Well I didn't changed the player in between. That holds for both versions.
Third the statement if(player[3] == player[5]){ doesn't work in both versions. No special effect at the army's location. But the other two are there, of course if they aren't outcommented.
Something like int7 = player[5].publicworkslevel; does work in the given code context and in the test situation in version 1.1 but it does not work in version 1.0. Maybe they fixed something but they could have some interacting problems.
So probably a lot of work has to be done. But that is an essential feature to make mods to work as intended.
-Martin
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:30. Apolyton Time is 00:30. |
top of page
|
|
|
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
|
|
|
|
|
|