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 > Scenario League / Civ2-Creation -Archive > Changing Allegiance of Units
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
St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:13
Wink  Old Post 02-04-2001 00:55 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Changing Allegiance of Units Support Apolyton, buy GURPS/ Alpha Centauri

I need to change the allegiance of all the barbarian units (300+ of them) in the scenario I am developing to the second tribe. How should I go about doing it?

------------------
St. Leo
http://www.sidgames.com/hosted/ziggurat/
http://www.sidgames.com/forums/

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:13
Post  Old Post 03-04-2001 17:19 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Using a hexeditor you could probably use some function like "replace all". You'll somehow have to prevent all values not related to the civ number to remain unchanged, however.

St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:13
Wink  Old Post 04-04-2001 07:14 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Could you post somewhat more detailed instructions? I am not even green behind the ears when it comes to hex-editing. Alternatively, I could the save file to anyone who's interested in helping make a jaw-dropping scenario.

------------------
St. Leo
http://www.sidgames.com/hosted/ziggurat/
http://www.sidgames.com/forums/

Gothmog is offline Gothmog
Prince
Minas Morgul
Jan 1970
time: 00:13
Post  Old Post 04-04-2001 17:42
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton

I am surprised that an experienced scenario maker would ask such a question. So, I assume that you were looking for some quick way to do this and avoid the obvious solutions.
1. Delete the units stack by stack and recreate them.
2. Bribe them where you can.

As for hex editing, I doubt this is the solution. I tried to implement such a function for changing unit ownership (when changing city ownership)in civcity, but I could never get it to work. Apparently unit ownership information is stored in more than 1 place.

------------------
"There is no tiddle-taddle nor pibble-pabble in Pompey's camp."

St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:13
Unhappy  Old Post 05-04-2001 02:43 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton or Terrorists Win

I guess I'll have to try bribing them, but that is not any more fun than deleting and placing them all over again.

------------------
St. Leo
http://www.sidgames.com/hosted/ziggurat/
http://www.sidgames.com/forums/

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:13
Post  Old Post 09-04-2001 15:16 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Am I too late? Otherwise you could send it over to me, and I'll see what I can do. It'll probably take a week or more before I've actually checked my mail again, solved the problem and resent it, though.

Some specifics on what could (or should) solve the problem: I don't know if you're familiar with Allard's "Hex Editing" doc? Anyway, there's a unit section in the scenario file, but you knew that, I guess. For every unit its civ number is stored. Those all have to be changed from barbarian (0?) to 2nd civ. And I believe apart from that you need to change the owner of the squares they're on, too (which is probably the problem you ran into, Gothmog, because I don't think there's more than one place for unit ownership info). Each square is assigned an owner (which determines the color of an airbase, for one), all squares of which the unit changes from barb to 2nd need to be updated too, I think.

Gothmog is offline Gothmog
Prince
Minas Morgul
Jan 1970
time: 00:13
Post  Old Post 10-04-2001 16:21
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Browse Apolyton AD-FREE

Mercator,

That's it!

------------------
"There is no tiddle-taddle nor pibble-pabble in Pompey's camp."

Allard HS is offline Allard HS
Prince
NL
Jan 1970
time: 06:13
Post  Old Post 11-04-2001 05:07 Visit Allard HS's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Browse Apolyton AD-FREE

All very nice, but as far as my test results prove me, changing a unit ownership does not require the terrain ownership to be changed. Maybe that will force the game to a green unit on top of a white airbase, but who cares about that?

No, no, I was able to change a unit to another owner without any trouble at all. The easiest way to do it:

1) open the game with an hex editor
2) convert the x and y coordinates to hex, eg. (63,53) becomes 3F 00 35 00 (note the 00's are behind the values not in front of them, that's because they are inverted, so a square (300,500) would become 2C 01 F4 01 instead of 01 2C 01 F4)
3) search for that x and y coordinate in the file
4) the 8th byte is the ownership of the unit (counting the first coordinate number as the 1st byte)

This may seem a long and tedious process to do for 300 units, but in reality, as units created after each other are listed after each other, you need just jump down two lines and change the next unit.
To do this, set the length of a line to 13 hex per line, and also, of course, the units indeed need to be created after each other (control this by checking their id: when the reveal complete map is enabled, right click on a unit).

This is no doubt the fastest way to do it, most efficient too, as it has least chance of mistakes, and it works perfectly for me. no problem..

so, hope this helps..

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:13
Post  Old Post 11-04-2001 05:07 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Gothmog, you might know the answer to this one. Can you hex-edit a scn. file so that Events produce FOOD caravans? I asked this in a previous thread, but no one knew the answer.

Allard HS is offline Allard HS
Prince
NL
Jan 1970
time: 06:13
Post  Old Post 11-04-2001 05:14 Visit Allard HS's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Techumseh, let me take the liberty of answering your question, though it may not have been intended to me..

Well, I maybe have no right to answer, as I do not knów the answer, but I will just tell what I think of it.

The thing is, a saved game can be hex edited, no problem, and the caravan commodity can be edited. All very simple. And the future can be edited in events, but all except this thing.

As information regarding the events are not stored there (except when embedded), and as units to be created later on therefore are also not stored, we can't look for this into the hex edited file.

Impossible therefore? Unless the events embedded into the saved game will allow this, (you know, the annoying things that delevents removes). But that has not been done before, and frankly, I don't have the time to do so.
But I don't have much hope for this anyway, and scenarios loaded don't include any embedded events, just saved games. Might be different for ToT, though.

Another, the more serious work-around option might be to create an editor to change the memory, but now we're talking about real programming. Maybe Jorrit can explain us more about that.
[This message has been edited by Allard HS (edited April 10, 2001).]
[This message has been edited by Allard HS (edited April 10, 2001).]

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:13
Post  Old Post 11-04-2001 08:59 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Enter the AD-FREE zone

Thank you Allard, of course I'm pleased for you to answer. But too bad about your answer! Does anyone else have a more encouraging one?

St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:13
Wink  Old Post 12-04-2001 04:15 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Enter the AD-FREE zone

Angello Scotto has written a memory-changing program for ToT.

------------------
Leons Petrazickis (St. Leo)
http://aventine.cf-developer.net/minizigg/
petrazi@sprint.ca

Xin Yu is offline Xin Yu
King
Emeryville, CA, USA
Jan 1970
time: 21:13
Post  Old Post 12-04-2001 06:06 Visit Xin Yu's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton or Terrorists Win

First, make a back up file of rules.txt;
Second, change rules.txt so that road modifier is 1 and all units are spies, domain 3 units with move 127 and cost 10;
Third, hex edit the saved file and play as barbarian, move barb units so that they are not stacked and not close to the perticular civ's cities; Fourth, Change back to human civ, give yourself 30k and bribe them!
Last, change back to the original rules.txt.

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:13
Post  Old Post 12-04-2001 11:19 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Suffering from ads?

Was that an answer to St. Leos' question or mine?

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:13
Post  Old Post 12-04-2001 15:14 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton buy from Amazon

St. Leo's I'd say . By the way, have you tried entering "Food Supplies" as commodity in the events file? Sounds kinda stupid, but who knows.

quote:

Another, the more serious work-around option might be to create an editor to change the memory, but now we're talking about real programming. Maybe Jorrit can explain us more about that.

Hahaha! I think not. Not that I can't program, but that's a bit out of my league.

Gothmog is offline Gothmog
Prince
Minas Morgul
Jan 1970
time: 00:13
Post  Old Post 12-04-2001 17:34
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Increase Your PM Length

Techumseh,
I'm sorry, but I have to agree with Allard concerning the caravan thing. I wish it were true that you could set the commodity for caravans with events, but I don't see how hacking the saved game file could affect events. The save file is mere data, the civ2 executable is what interprets the event language (that's really what it is, a very limited programming language).

------------------
"There is no tiddle-taddle nor pibble-pabble in Pompey's camp."

Angelo Scotto is offline Angelo Scotto
Warlord
Milan, Italy
Oct 1999
time: 05:13
  Old Post 22-04-2001 04:00
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton buy from Amazon

Techumseh, Gothmog and Allard are right, these things are not possible... in classic Civ2.
But we were talking about Tot, right? well, then i'm happy to say you should be able to realize your event using CSPL (and BTW this is a VALID
reason to buy Tot instead of MGE but this is an old querelle...).
I would like to realize your event if you want, just send me an e-mail explaining exactly the kind of event you want to realize
(what causes those caravans to be created? and things like that).

Greetings,
Angelo

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:13
Post  Old Post 22-04-2001 13:44 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Woo Hoo! Angelo never ceases to amaze! Will do.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:13.
Apolyton Time is 00:13.
    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.0392 seconds (90.61% PHP - 9.39% 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