Actions

Object Data: Difference between revisions

From Populous Wiki

No edit summary
No edit summary
Line 8: Line 8:
  SWord 06 : Position-Y
  SWord 06 : Position-Y


The X and Y coordinates are in Big Endian byte ordering to convert to Little Endian take the first byte and multiply it by 255 then add the second byte. Additionally the X and Y coordinates are even numbers from 0-254.  This differs from the land coordinates which are 0-127.  To convert to the land coordinates, divide by 2 and add 0.5 to get the object in the center of the square.
The X and Y coordinates are in Big Endian byte ordering, additionally the X and Y coordinates are even numbers from 0-254.  This differs from the land coordinates which are 0-127.  To convert to the land coordinates, divide by 2 and add 0.5 to get the object in the center of the square.


See [[Dat Format]] for more information.
See [[Dat Format]] for more information.

Revision as of 07:17, 13 August 2014

When editing the object data in dat files each object has a Type and Model.

All Objects Start with:

UByte 01 : Model 
UByte 02 : Type
SByte 03 : Owner (Tribe)
SWord 04 : Position-X
SWord 06 : Position-Y

The X and Y coordinates are in Big Endian byte ordering, additionally the X and Y coordinates are even numbers from 0-254. This differs from the land coordinates which are 0-127. To convert to the land coordinates, divide by 2 and add 0.5 to get the object in the center of the square.

See Dat Format for more information.

Types

  • 01 - Followers
  • 02 - Buildings
  • 03 - Creature
  • 04 - Vehicle
  • 05 - Scenery
  • 06 - General
  • 07 - Effect
  • 08 - Shot
  • 09 - Shape
  • 10 - Internal
  • 11 - Spell

Models

01 Followers

02 Buildings

03 Creature

All will show as Eagle.  Singleplayer only.
  • 01 - Bear
  • 02 - Buffalo
  • 03 - Wolf
  • 04 - Eagle
  • 05 - Rabbit
  • 06 - Beaver
  • 07 - Fish

04 Vehicle

05 Scenery

  • 01 - Tree 1
  • 02 - Tree 2
  • 03 - Tree 3
  • 04 - Tree 4
  • 05 - Tree 5
  • 06 - Tree 6
  • 07 - Plant 1
  • 08 - Plant 2
  • 09 - Stone Head
  • 10 - Fire
  • 11 - Wood Pile
  • 12 - Reincarnation Site Pillar
  • 13 - Rock
  • 14 - Portal
  • 15 - Island
  • 16 - Bridge
  • 17 - Dormant Tree
  • 18 - Top Level Scenery
  • 19 - Sub Level Scenery

06 General

  • 01 - Light
  • 02 - Discovery
  • 03 - Debug Static
  • 04 - Debug Flying
  • 05 - Debug Flag
  • 06 - Trigger
  • 07 - Vehicle Construction
  • 08 - Mapwho Thing
  • 09 - Building Add On
  • 10 - Discovery Marker

07 Effect

  • 01 - Simple Blast
  • 02 - Sprite Circles
  • 03 - Smoke
  • 04 - Lightning Elem
  • 05 - Burn Cell Obstacles
  • 06 - Flatten Land
  • 07 - Move Rs Pillar
  • 08 - Prepare Rs Land
  • 09 - Sphere Explode
  • 10 - Fireball
  • 11 - Firecloud
  • 12 - Ghost Army
  • 13 - Invisibility
  • 14 - Explode Bldg Partial
  • 15 - Volcano
  • 16 - Hypnotism
  • 17 - Lightning Bolt
  • 18 - Swamp
  • 19 - Angel of Death
  • 20 - Tornado
  • 21 - Swarm
  • 22 - Firestorm
  • 23 - Erosion
  • 24 - Landbridge (Requires additional parameters)
  • 25 - Wrath of God
  • 26 - Earthquake
  • 27 - Fly Thingummy
  • 28 - Sphere Explode And Fire
  • 29 - Big Fire
  • 30 - Lightning
  • 31 - Flatten
  • 32 - General
  • 33 - Shape Sparkle
  • 34 - Lava Flow
  • 35 - Volcano Explosions
  • 36 - Purify Land
  • 37 - Unpurify Land
  • 38 - Explosion 1
  • 39 - Explosion 2
  • 40 - Lava Square
  • 41 - Ww Element
  • 42 - Lightning Strand
  • 43 - Ww Dust
  • 44 - Raise Land
  • 45 - Lower Land
  • 46 - Hill
  • 47 - Valley
  • 48 - Place Tree
  • 49 - Rise
  • 50 - Dip
  • 51 - Rein Rock Debris
  • 52 - Clear Mapwho
  • 53 - Place Shaman
  • 54 - Place Wild
  • 55 - Bldg Smoke
  • 56 - Much Simpler Blast
  • 57 - Tumbling Branch
  • 58 - Conversion Flash
  • 59 - Hypnosis Flash
  • 60 - Sparkle
  • 61 - Small Sparkle
  • 62 - Explosion 3
  • 63 - Rock Explosion
  • 64 - Lava Gloop
  • 65 - Splash 6
  • 66 - Smoke Cloud
  • 67 - Smoke Cloud Constant
  • 68 - Fireball 2
  • 69 - Ground Shockwave
  • 70 - Orbiter
  • 71 - Big Sparkle
  • 72 - Meteor
  • 73 - Convert Wild
  • 74 - Bldg Smoke 2 Full
  • 75 - Bldg Smoke 2 Partial
  • 76 - Bldg Damaged Smoke
  • 77 - Delete Rs Pillars
  • 78 - Spell Blast
  • 79 - Firestorm Smoke
  • 80 - Player Dead
  • 81 - Reveal Fog Area
  • 82 - Shield
  • 83 - Boat Hut Repair
  • 84 - Reedy Grass
  • 85 - Swamp Mist
  • 86 - Armageddon
  • 87 - Bloodlust
  • 88 - Teleport
  • 89 - Atlantis Set
  • 90 - Atlantis Invoke
  • 91 - Statue To AoD
  • 92 - Fill One Shot
  • 93 - Fire Roll Elem

08 Shot

  • 01 - Standard
  • 02 - Standard 2
  • 03 - Standard 3
  • 04 - Fireball
  • 05 - Lightning
  • 06 - FireWarrior
  • 07 - Volcano Fireball 1
  • 08 - Volcano Fireball 2

09 Shape

  • 01 - General

10 Internal

  • 01 - Formation
  • 02 - Beacon
  • 03 - Thing Info Display
  • 04 - Soul Convert
  • 05 - Soul Man
  • 06 - Preacher Attract
  • 07 - Object Face
  • 08 - Fight
  • 09 - Pre-Fight
  • 10 - Guard Control
  • 11 - Bridge Control
  • 12 - Soul Convert 2
  • 13 - DT Beacon
  • 14 - Player Raise
  • 15 - Player Lower
  • 16 - Guard Post Display
  • 17 - Player Smooth
  • 18 - Wood Distribute
  • 19 - Sinking Building

11 Spell Cast

Buildings and Worship Items

SLong 08 : Angle of Building

All buildings contain one number indicating the angle of the structure.

Worship items must be neutral to work

Scenery

SWord 11 : Angle of Scenery
UByte 16 : Level Scenery Num

The scenery types 18 - Top Level Scenery and 19 - Sub Level Scenery make use of an extra byte field for the Scenery number. These show various rocks and pillars (Identified as "Special" in the Populous World Editor).

The possible values for top level scenery are:

  • 39 - Double stacked pillars
  • 40 - Single tall pillar
  • 41 - Single short pillar
  • 42 - Triple tall rock cluster
  • 43 - Single tall rock
  • 44 - Double tall rock cluster

Effect: Landbridge

SWord 8 : End point X
SWord 12 : End point Y

Triggers

Every worship item uses a trigger. Triggers give the properties of a worship item and what happens when it is worshipped. Triggers are placed on the same position as the worship item.

Trigger Types

00 - Proximity (Stone Head or Totem Pole)
01 - Timed  (Usually reoccurring automatic things)
02 - Player Death
03 - Shaman Proximity (Obelisk)
04 - Library (Vault of Knowledge)
05 - Shaman AOD (Gargoyle)

Trigger Data:

UByte 01 - 6   : Model: Trigger
UByte 02 - 6   : Type: General
SByte 03 - 0   : Owner
SWord 04 - 0   : Position-X
SWord 06 - 0   : Position-Y
-
UByte 08 - 0   : Trigger Type: Types listed above
UByte 09 - 1   : Cell Radius 
UByte 10 - 1   : Random Value
SByte 11 - 1   : Number of Occurrences (0 for infinite, -1 for retrigger)
UWord 12 - 6   : Trigger Count: Number of followers to worship it (1 if it is an obelisk or gargoyle) or timed trigger time
UWord 14 -     : 10 Thing idx
...
UWord 34 - 180 : Pray Time in quarter-seconds
UByte 36 - 0   : Start Inactive
UByte 37 - 0   : Create Player Owned
SWord 38 - 1   : Inactive Time

These are all the settings a trigger has. From the 14th byte to 33 are 10 words containing the effects or discoveries linked to it. A trigger can hold up to 10 effects, the word contains the idx of the effect.

The idx is the initial object count in the dat file. For example you might have 40 objects in the dat file and the 7th object was the effect, the idx would be 7. Then the effect occurs only when the worship object has been worshipped.

Timed Triggers

Timed triggers use the Trigger Count attribute for the time until the trigger will activate. Unlike the pray time for normal triggers, timed triggers use Game Turns rather than quarter-seconds. Timed triggers also make use of the Number of Occurrences being set to -1 meaning they need to be triggered by another trigger to activate again. This can be used to link multiple triggers together to get more than 10 effects from a single trigger action.

Discoveries

Availability Types

0 - Not Available
1 - Permanent (Needed for Vault of Knowledge)
2 - Level
3 - Once 
4 - Discovery

Triggers can be linked to almost anything from discoveries to followers. A discovery is a spell or building that is obtained.

UByte 01 -   2 Model: Discovery
UByte 02 -   6 Type: General
SByte 03 - 255 (Owned by nobody)
SWord 05 -     Position-X (should be the same as worship item)
SWord 07 -     Position-Y
-
Byte  08 -  11 Discovery Type
Byte  09 -   4 Discovery Model
Byte  10 -   3 Availability Type 
Byte  11 -   1 Trigger Type
Long  12 -     Mana Amount

Effects can also be used, see a list of effects above. If no discovery is linked to a Stone Head it will appear as a Totem Pole in the game.

Rising Stone Heads

On some levels Stone Heads can rise when another Stone Head is worshipped. This is done by making another Stone Head with a trigger etc. and then linking the Worship Object and the Trigger to the Trigger that will making it rise.