 |
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
Prisoners of War/Traitors Mod
Readme:
One thing I missed in CTP and CTP2 from Civ2 was the diplomat/spy ability to bribe enemy units to join your army. To simulate this effect exactly would be very difficult to do, but I have been able to write some code that enables the player to capture enemy units in battle, and force them to fight for you.
To capture units in battle, stack a slaver with your army, which will enable the capture code to work.
The capturing takes place right at the end of the battle, because during testing I had found a way to attack and retreat with loads of different units, suffer few casualties, and double my army size... (This no longer works). Due to the difficulties in collecting equipment and materials, once you have captured the enemy soldiers, you are given a choice of how they should be incoporated into your army. All the choices are basically infantry units.
Age 1:
-Warrior
-Hoplite
-Archer
Age 2:
-Pikeman
-Samurai
-Archer
Age 3:
-Pikeman
-Infantryman
-MachineGunner
Age 4:
-Machine Gunner
-Paratrooper
-Marine
Age 5:
-Hover Infantry
-Marine
-Paratrooper
__________________________________
It always annoyed me, not having that "bribe" feature, but this is the best I can (or would be prepared to) do to bring it back.
Hope you all like it, it will be on the Way of the Wombat soon, but I'll attatch it here, because its basically only a slic file.
Attachment: pow.zip
This has been downloaded 21 time(s).
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
The AI will also be able to capture units. Whether or not they could figure the buttons out is another matter, but if they can't, then some simple code will sort that, and the AI will get a certain unit per age, or a randomly chosen one.
quote:
Also aren't slavers eventually phased out with the Emancipation Wonder?
|
Oops, forgot about that... But yes, it is possible to easily change the enabling unit to anything you want. "Battlemaster" or something. Details of the SLIC line to change are included in the readme.
No, my avatar isn't stabbing anymore I found the quality was poor (not that this one is much better) and it just seemed too assertive, and soooo cheesy. Maybe I will make an even better one someday. (When this is finished, Mars is done, my LOTR mentoring finished...)
Glad you like it. I thought you might want to use it Dave 
Ben
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
Yeah, that would be good.
Probably this will work, though this code gave me a few problems due to built-in SLIC bugs 
code:
HandleEvent(VictoryMoveOrder) 'capture' pre {
tmpArmy = army[0];
tmpNum = tmpArmy.size;
tmpPlayer = army[0].owner;
for(i = 0; i < tmpNum; i = i + 1) {
GetUnitFromArmy(tmpArmy, i, tmpUnit);
tmpNum2 = tmpUnit.type;
if(tmpNum2 == 56 || tmpNum2 == 99){
// number of unit. this example is slaver - || = "or", add as many as you need, with the correct numbers.
age = WOUTER_GetAge(tmpPlayer);
if(age == 5){
message (tmpPlayer, 'five');
}
elseif(age == 4){
message(tmpPlayer, 'four');
}
elseif(age == 3){
message(tmpPlayer, 'three');
}
elseif(age == 2){
message(tmpPlayer, 'two');
}
elseif(age == 1){
message(tmpPlayer, 'one');
}
}
}
}
If you were limiting it to one unit per age, then you can dispense with the messageboxes completely, as just put the CreateUnit event into the above code, instead (or as well as) the message. Also the buttons would not be needed. Just email me if it starts causing problems.
Ben
|
|
|  |
 |
|
hexagonian
|
 |
Gnawing on your mind...
Jun 1999 time: 23:14
|
|
When you mentioned SLIC problems, what were they?
I'm a bit confused as to how I can implement this coding - I glanced at it yesterday and noticed the section that referrred to the slaver.
if(tmpNum2 == 56 || tmpNum2 == 99){
I'm assuming that the above line is the one that I need to be concerned with. I'm assuming that I also need to cut and paste the entry
tmpNum2 == 56 ||
using it for each unit that I want to have the ability and then replacing the numbers with the numbers in units.txt that correspond to each unit.
I'm also looking at getting the following progression too. In looking at the coding again, I'm also a bit confused as to how I will code in the following info, as my setup is different from the default game. This is how I would like to see it happen
Captured unit becomes Spearman
Enable Advance is Toolmaking,
Obsolete Advance is Bronze Working
Captured unit becomes Hoplite
Enable Advance is Bronze Working,
Obsolete Advance is Dark Ages
Captured unit becomes Man at Arms
Enable Advance is Dark Ages,
Obsolete Advance is Flintlock
Captured unit becomes Infantryman
Enable Advance is Flintlock,
Obsolete Advance is Advanced Infantry Tactics
Captured unit becomes Machine Gunner
Enable Advance is Advanced Infantry Tactics,
Obsolete Advance is Chaos Theory
Last edited by hexagonian on 16-06-2001 at 01:46
|
|
|  |
 |
|
Immortal Wombat
|
 |
in perpetuity
Dec 2000 time: 05:14
|
|
The problems were difficulties getting it to work. They are solved (I hope) or I wouldn't have released it.
quote:
I'm a bit confused as to how I can implement this coding - I glanced at it yesterday and noticed the section that referrred to the slaver.
if(tmpNum2 == 56 || tmpNum2 == 99){
I'm assuming that the above line is the one that I need to be concerned with. I'm assuming that I also need to cut and paste the entry
tmpNum2 == 56 ||
using it for each unit that I want to have the ability and then replacing the numbers with the numbers in units.txt that correspond to each unit.
|
That is correct, but the last unit in that line does not need the || after it, as the double line means "or", so the last tmpNum2 = xx does not need it.
Because you are only doing it with one unit being captured, you can leave out the buttons, and just have the alertboxes to make you aware that it has happened.
So...
If you look at the WOUTER_GetAge function that I took from the militia code, you can remove the "&& HasAdvance(tmpPlayer, ID_ADVANCE_XXX) bit from each line, then replace the first advance on each line with the advance you want there.
Because you want the code to obsolete at Chaos Theory, it will need an extra line or two.
You've done it in reverse really, I had it start late, and not finish, you have it set to start at the beginning and finish early.
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
| archivepost |
|
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
|
|
|
|
|
|