Questions about modding Civ 2 ToT

Civinator

Blue Lion
Supporter
Joined
May 5, 2005
Messages
9,991
While reanimating my old Civ 2 ToT spacewar scenario with the working title "Galactic Conquests" I run into some questions and hope, you can help me with finding answers to them.

In the Civ 2 ToT civilopedia there is the option to use bigger images for the improvements and wonders in the game (imp-images). When I use them, I get the pictures doubled in the civilopedia.

Is there a way to get rid of the small icons-images in the civilopedia view and keeping the small icons in the city view where I think they are still needed?

attachment.php
 

Attachments

  • Babylon 5 Station.jpg
    Babylon 5 Station.jpg
    76.4 KB · Views: 993
Thank you very much for the answer Catfish. :) I found the story about the small icons files the hard way when looking for a graphical solution of that problem. When I set the small icon of that wonder to the colour of the Civwin_back, the disturbing second image in the civilopedia disapeared, but I also lost the image of the building in the city list (built improvements) and the overwiew in the civiliopedia.

As this problem seems to be hardcoded, may be there can be a graphical solution of that problem. It is possible to show even much bigger Imp-files in the civilopedia. When the imp-file is getting oversized to 243x195, the frames around that image stop at the size of 243x195. The image itself can be shown in the civilopedia in much bigger dimensions.

attachment.php


Now the next step I did, was to take a screenshot of the entire civilopedia entry with the image of the wonder, to cut out the disturbing small icons picture and to fill the gap with the colour of the Civwin_back and to give that image the name of the Imp-image.

attachment.php


Now the problem is, that the program sets some frames around the image that appear "doubled" when looking in the civilopedia. The text in the screenshot now is a pure image (no more real text).

Does anybody know, what graphics are used for these both broken frames? May be by setting these graphics to transparency, the problem can be solved completely. :) (- so the link in the civilopedia entry to the tech will be lost).
 

Attachments

  • Babylon 5 633x392.jpg
    Babylon 5 633x392.jpg
    59 KB · Views: 813
  • Babylon 5 reworked.jpg
    Babylon 5 reworked.jpg
    79.8 KB · Views: 786
Interesting. I looked at this many years ago. I went the other way and used a picture consisting of a single pixel. I can't remember too much about it. You're ahead of me here. If I have time I'll revisit.
 
This is my solution to that problem at present:

attachment.php


The only thing to do, was to cut away the left and the upper frame of the screenshot. The only backside of that solution is, that the link to the tech isn´t working any longer as it now is an image and no more text.

On the other side, when looking at the oversized Babylon 5 image, I have to say, that this picture has a special attraction to me. The image shown here, is much bigger than a wondersplash in Civ 3! It´s fascinating, what possibilities good old Civ 2 ToT still is holding for modders. :)
 

Attachments

  • Babylon 5 Correct.jpg
    Babylon 5 Correct.jpg
    78.3 KB · Views: 953
Next question:

Is there a possibility to add additional sections of descriptions combined with images to the civilopedia?

If possible, I want to show and to describe the different races and their special options in the civilopedia.
 
Text and images? Not that I'm aware of, but you can keep adding entries to the @CONCEPT_DESCRIPTIONS section of describe.txt.

One more time thank you very much Catfish, for your answer. :)

Nice work, Civinator! Will try this myself...

Thank you very much for your kind words. :)
 
My next question is about an event for my spacemod that doesn´t work properly.

When the civs have researched the tech "The Force", they can select to research next the tech "The Jedi Ordre" (tech 82) or the tech "The Dark Side of the Force" (tech 58). At the start all civs can research both techs and both techs don´t lead to the future tech.

Now I want a civ to be blocked in researching the other tech when they have one of these techs researched. For example if the Klingons (or each other civ) research "The Dark Side of the Force" that civ shouldn´t be able to research "The Jedi Ordre" any longer -and otherwise, when the Klingons (or each other civ) researched "The Jedi Ordre" they shouldn´t be able to research "The Dark Side of the Force" any longer.

The Dark Side of the Force gives very strong weapons but the civ must conquer two galaxies, while the Jedi Ordre gives additional happiness and opens an additional way to win in the later game by leading the civ to the next level of evolution.

Here is my not working effort on the event file. The event doesn´t work neither when using the placeholders anybody and triggerreceiver nor when using the name of a civ. It´s nearly ten years ago, when I worked the last time with these events:

@IF
ReceivedTechnology
Receiver=Anybody
Technology=58
@THEN
JUSTONCE
PLAYWAVEFILE
Vader.wav
Enable technology
whom=triggerreceiver
technology=82
value=2
@ENDIF

@IF
ReceivedTechnology
Receiver=Anybody
Technology=82
@THEN
JUSTONCE
PLAYWAVEFILE
Force.wav
Enable technology
whom=triggerreceiver
technology=58
value=2
@ENDIF
 
You've got two problems:

1. The success of the EnableTechnology action depends on which groups (Leaders2) you've placed the two technologies. Check this article.
The EnableTechnology event does not change the restriction rule for the specified technology, it changes the group rule for the specified tribe, ie, it writes the changes to the Leaders2 section in the SAV file. It would actually be more accurate to define the technology specified in the event as: the group to which this technology is assigned. Consequently, the EnableTechnology event will affect all other technologies within the same group as the specified technology.

2. The ReceivedTechnology trigger is only checked at the beginning of each turn. That means it is possible for a player to start researching the opposing tech branch before the event kicks in. What you could do is create a bottleneck in the tech tree so that at some point the only two researchable techs are #58 and #82. Place both of these techs in the same Leaders2 group. As soon as a player researches the prerequisite tech, The Force, ban that group with value=2. The ban will not take effect until the following turn, so the player can still choose one of those two technologies.

Example:

Set the Civilize2 and Leaders2 tables up as follows at the beginning of the game. The Force is in Group 0, the other two in Group 1.
Code:
@CIVILIZE2
0 ; Tech 10, The Force, Prerequisite
1 ; Tech 58, The Dark Side of the Force
1 ; Tech 82, The Jedi Order

Players can research techs in all groups:
Code:
@LEADERS2
00000000 ;Player 1
00000000 ;Player 2, etc

Note that the Leaders2 table is written to memory (embedded in the SAV file, when you save) during the build world phase of the game. Thereafter, it can only be modified using EnableTechnology events or hex editing.

When Player 1 researches The Force, Group 1 is disabled for that player in the following turn:
Code:
@IF
ReceivedTechnology
receiver=Anybody
technology=10 ;The Force
@THEN
JustOnce
EnableTechnology
whom=TriggerReceiver
technology=58 ;Either 58 or 82, it doesn't matter as they both belong to Group 1.
value=2
@ENDIF

That event makes the following change to the Leaders2 table in memory/SAV file:
Code:
@LEADERS2
02000000 ;Player 1 (TriggerReceiver)
00000000 ;Player 2, etc

Player 1 is now banned from Group 1, which includes techs #58 and #82. [Edit: :hmm: You will hit a snag if a player obtains The Force by some means other than research. If this is for a mod, I guess this type of event is out of the question.]

Alternatively, use a completely different trigger to open up one side of the tree. For example, killing a 'good' unit allows a player to research the 'bad' techs and, at the same time, disables the equivalent 'good' event.
 
Catfish, thank you very, very much for all your efforts you invested in your answer. :):thanx:

The event is for a mod. Doesn´t the "received technology trigger" work properly if the tech is gained by other means than research (p.e. stealing or conquest of a city)?


The problem with the bottleneck is, that there must be a researchable way to the future tech, and therefore at present I think, there is a need for a third path besides the both opposing techs.

When I have understood all well, I give both techs in a special group, that all players can research at the start, but that becomes forbidden, if the player has researched one of these techs by the setting of value=2. I can´t use group zero for these techs, as otherwise I would forbid all other techs that are in group zero to be researched.

As I´m still using group 0 - 3 for giving the civs some of their specific spaceships, even when in the same group of selection at the start, I could use group 4 (or 5-8) for these settings.

As the event is only working in the next turn, something should be found to prevent the player from starting the research of the other tech in the turn before the event is working. The bottleneck solution seems to have the problem, that a third researchable path to the future tech is needed and when the AI is reasearching this path, the bottleneck in the perequisite tech is closed for both opposing techs.

When I use the methode to set both opposing techs in a group, that can be researched from start, but is disabled for that civ, when one of these techs is researched, it can happen, that the player starts to research the other tech, before the event that disables that tech, starts working.

Can an additional event, that takes away the other tech from that civ, if it is researched in the turn before the disable event is starting to work, help to overcome that problem?

I have to experiment with this the next weekend.
 
Doesn´t the "received technology trigger" work properly if the tech is gained by other means than research (p.e. stealing or conquest of a city)?
Yes it does. The problem is that in the example I posted above, techs 58 and 82 will become unavailable the turn after a tribe acquires The Force. A tribe may be part-way through researching some other tech when they obtain The Force by trading or conquest. When it comes time to select the next tech for research, it'll be too late. Note that if you plan on using Civilize2/Leaders2 in your mod, you must ban role 6 units (diplomats and spies). There's a bug that allows these units to steal rule 2 technologies.

The problem with the bottleneck is, that there must be a researchable way to the future tech, and therefore at present I think, there is a need for a third path besides the both opposing techs.
That's true, but you could get away with making FT temporarily unavailable. For example, FT could be unavailable to the Star Wars tribes at the beginning of the game and then become available once they have researched The Force. The path to FT is required because the game crashes when the AI has nothing left to research, so there won't be a problem so long as the AI has something to research.

When I use the methode to set both opposing techs in a group, that can be researched from start, but is disabled for that civ, when one of these techs is researched, it can happen, that the player starts to research the other tech, before the event that disables that tech, starts working.

Can an additional event, that takes away the other tech from that civ, if it is researched in the turn before the disable event is starting to work, help to overcome that problem?
That would mean using TakeTechnology to remove the tech once a player had spent the time researching it.
 
Sorry for the late response Catfish. Your hint on the role 6 units (diplomats and spies) is very important for me as I use diplomats and spies and also the Civilize2/Leaders2 setting. Diplomats are ideal jediknights and spies are Dark Jedis (Vader etc.). To bribe cities and units is a lot of "force" for a single unit.

For redoing the complete techtree of that mod, to create such a bottleneck, at present I don´t have the time (that´s also the reason for the late response).

One more question for modding ToT:

Is there a way to trigger the "Gates of Hel" (a random set connection between normal Earth and subdirt ways) ? Everytime when I load preset maps to my mod, I don´t receive such a random connection between the two maps. The Gates of Hel only appear, if the game creates these maps itself.
 
If a civ gets a receivedtechnology event will it make previous techs on that tech tree available?
F.e;
Hunnic bow-->Frame saddle-->Stirup
CivA gets through an event the Stirrup tech. Does it make the other two researchable or obtained automatically?
And likewise if the civA gets the enabletechnology Stirrup event does it make the previous two researchable?
 
I think if the tech is awarded, and the civ has preq techs for the previous techs, then yes, they become available for research...
 
Here is my next question:

As the techtree for my upcoming spacemod is rather complex, I thought it could be a good idea, to integrate a screenshot of the techtree into that mod to give the players a better orientation about research in the game.

Therefore I modded the ToT credits file to zero text in it and replaced with the resource hacker the background graphics of the "About Test of Time" window in the civilopedia registry to that techtree. Even when reduced to the 670x480 format that techtree was mostly readable and gave an idea about the overall direction in research:


Spoiler :
attachment.php


But when I click on the new techtree window in my mod (the former "About Test of Time" I get the following not useable image with the white background changed to blue:

Spoiler :
attachment.php


Does anybody here know what to do to get the techtree in better visuable shape?
 

Attachments

  • Techtree Resource Hacker.jpg
    Techtree Resource Hacker.jpg
    242.9 KB · Views: 604
Is there a way to trigger the "Gates of Hel" (a random set connection between normal Earth and subdirt ways) ? Everytime when I load preset maps to my mod, I don´t receive such a random connection between the two maps. The Gates of Hel only appear, if the game creates these maps itself.
Sorry, haven't looked into it.

If a civ gets a receivedtechnology event will it make previous techs on that tech tree available?
F.e;
Hunnic bow-->Frame saddle-->Stirup
CivA gets through an event the Stirrup tech. Does it make the other two researchable or obtained automatically?
Answered elsewhere: no and no.

And likewise if the civA gets the enabletechnology Stirrup event does it make the previous two researchable?
Not by itself, but it will open that pathway (if closed via CIVILIZE2/LEADERS2) for the player if all three technologies belong to the same LEADERS2 group. The player would still require the prerequisite for Hunnic bow.

Does anybody here know what to do to get the techtree in better visuable shape?
The palettes for the GIFs in the DLL files are generally pretty lousy. That image uses one of the better ones: the same as the standard Civ2 palette. In Resource Hacker, export the original image from Tiles.dll: Action → Save resource as binary file... → Whatever.gif. Open the file in your graphics editor. You can either paste your new image into that file, or better, save its palette, open the replacement image and then load that palette to your new image. The latter often (depending on the editor) allows you a choice of colour resampling method and you won't have to worry about resizing the image. Can't do it in MS Paint. Post your original tech tree image if you need it fixed.
 
Catfish, one more time thank you very much. :):) With your excellent short tutorial about palettes in Resource Hacker (and PSP7) I was able to fix the image.

attachment.php
 

Attachments

  • Techtree ResourceHacker.jpg
    Techtree ResourceHacker.jpg
    336.5 KB · Views: 569
Back
Top Bottom