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 > Civilization II > Civ2-Test of Time > Yet another (sprite) discovery
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
29.Jul: MOVING UP ON REVISED `TOP 100` INDEX
29.May: GAME MECHANICS REFERENCE BOOKLET
06.Mar: DROPPING FROM SECOND TO THIRD

bottom of page
  - CIVILIZATION 2 from $6.95 - CIVILIZATION 2 from $4.25 - CIV2: TEST OF TIME from $2.50 - CIV2: MULTIPLAYER GOLD EDITION from $4.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:29
  Old Post 29-06-2003 03:06 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Yet another (sprite) discovery Support Apolyton buy from Amazon

Compared to MGE, ToT savegames have 5 extra words (=short unsigned integers, taking up 2 bytes and a range of -32,768 to 32,767) at the end of each unit.

The 3rd word can be 0 to 3 and relates to which animation to use when the unit is active (animations are only ever used for active units). The order corresponds to that in the unitXX animation sprites:
0 Attack
1 Die
2 Idle
3 Move

The 4th word can be 0 to 7 and this determines the facing direction (both for active and inactive units, in other words, both for the unitXX and static sprites). In clock-wise direction from North (0) to Northwest (7).

Since these are words there are much more possible values, however, I think the above are the only valid ones. Some other values do work (e.g. making a warrior look like an engineer when static), but a lot of other values outright crash ToT.


There is at least one way this can be exploited. One single unit can be used for up to 5 (or 8 if you don't mind mirroring) different "impassable" units. Say, you could have a Great wall unit, and use different graphics for each of the 5 different facing directions to create a winding wall. This way you will only need 1 unit, rather than 5 different ones, so you can create more varying graphics without sacrificing any more valuable unit slots.

This will only work, however, for units that can't move (or the unit would turn to face the moving direction) and can't be attacked either (or the unit would turn to face the attacker).


Oh, and of course, to create impassable units, using my previous discovery to hide the unit key would be pretty mandatory.


And by the way, I updated SpriteGen a little too. See the earlier thread, or check my MapEdit website.

Last edited by Mercator on 29-06-2003 at 17:22

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:29
  Old Post 29-06-2003 08:45 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton or Terrorists Win

Hmmm...Nice work Sherlock. Despite the fact that there is a leg-humping smiley at Space Spider, I'll just say .

Is the following 'fog of war' effect possible? Immobile units, which differ in strength, share a name and sprite. When they get attacked, they show their own distinctive sprite. That way you have to do a recon attack before attacking with something valuable. Do you just have to be real careful about how they face when they're deployed and attacked? I've turned off sprites for so long, I've forgotten whether attacks from directions other than E or W trigger other sprites.

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:29
  Old Post 29-06-2003 17:50 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Browse Apolyton AD-FREE

The static sprite file stores 5 different angles, from North through East to South. Southwest, West and Northwest are mirrored versions of Southeast, East and Northeast, respectively.

Well, the same name and sprite is as easy as giving more units the same name in the rules, and the same icon in the units bitmap/static sprite file, so that's not the problem.

A unit can only get a different icon under attack when it is attacked from an angle it isn't facing...

So, you could create an immobile unit facing N. If it's attacked from any other angle than N, the sprite changes to the "real" unit. From that point onward the unit will be "revealed" (assuming that it can't ever be attacked from N and "hide" again).

So, yep, it will work... You just have to limit the possible attack angles (compared to the initial facing direction), and keep in mind the mirroring...

For example, if a unit initially faces N, it must not be possible to attack from N. But if a unit faces NE, it must not be possible to attack from either NE or NW.
Secondly, if a unit can be attacked from both E and W, keep in mind that the unit will mirror. In most cases this shouldn't be an issue. But you might not want, say, the Statue of Liberty switching the torch to her left hand.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:29.
Apolyton Time is 00:29.
    top of page
Rate This Thread:
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.0334 seconds (88.34% PHP - 11.66% MySQL) with 30 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