Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > New Mod
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 14-06-2001 18:32 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
New Mod Support Apolyton, buy Call to Power 2

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).

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:14
  Old Post 14-06-2001 21:06 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton

Ben,

Does this code work both ways??? - will the AI be able to also use this code to capture units???

...if so, I will be putting it in Cradle then.

after I test it.

hey, your avatar isn't stabbing anymore!!!

ENGINEER is offline ENGINEER
Chieftain
Dallas, TX USA
Nov 2000
time: 01:44
  Old Post 14-06-2001 23:28
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Got spare money?

That's pretty cool, but the AI does not seem to use slavers in an army stack. Seems like another unfair advantage to the human player. Also aren't slavers eventually phased out with the Emancipation Wonder? Any way to have it happen with any unit? Still pretty cool. Let me just say that the modders on CTP II come up with some of the neatest things. CTP II seems to be able to do a lot of things (with a lot of work).

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 15-06-2001 04:29 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton buy from Amazon

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

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:14
  Old Post 15-06-2001 18:23 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Put an end to popups!

Ben,

What I would like to do is tie this coding into all of my wonder units (and possibly a couple others) instead of the slaver unit. Is it possible to code for multiple units?

I also would like to limit the coding to the weakest unit available in each age - i.e warrior/hoplite for the ancient, man-at-arms/infantryman for the medieval and machine gunner for modern/future. I think I can handle that part of the coding though.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 15-06-2001 22:19 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Put an end to popups!

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 is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:14
  Old Post 16-06-2001 00:50 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Increase the size of your Attachments

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 is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 16-06-2001 15:06 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

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.

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 16-06-2001 15:16 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Here is the code to make it work, note that you will probablt want to change the messages in scen_str.txt, because they were set up for a choice of captured units.

Attachment: pow.slc
This has been downloaded 7 time(s).

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:14
  Old Post 17-06-2001 07:30 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Thanks Ben,

I got a really good game going now and I am hoping that plugging this coding into the current game will not effect it.

Do all I need to do is make my SLIC alterations and then reload SLIC via the cheat mode?

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 18-06-2001 00:36 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Increase Your PM Length

If you use the chat mode to reload the SLIC , (press ' , then /reloadslic ) then you can keep your score.
I think that should be fine.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:14.
Apolyton Time is 00:14.
    top of page
Rate This Thread:
archivepost
Forum Jump:
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
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0390 seconds (90.53% PHP - 9.47% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net