Adding modding folder with a hacked build.
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
### Critter Properties
|
||||
|
||||
#### Generic Critter Properties
|
||||
|
||||
**Generic Critter Propertes** (`CritterProp` struct) (75 bytes)
|
||||
|
||||
0000 byte Intelligence; unused
|
||||
0001 [21]byte Primary attack info
|
||||
0016 [21]byte Secondary attack info
|
||||
002B uint8 Perception
|
||||
002C uint8 Defence
|
||||
002D sint8 Projectile source height offset
|
||||
002E int32 Flags
|
||||
0032 byte Mirrored views; unused
|
||||
0033 [8]uint8 Frame numbers; Amount for each posture
|
||||
003B uint8 Animation speed
|
||||
003C byte Attack sound index
|
||||
003D byte Near sound index
|
||||
003E byte Hurt sound index
|
||||
003F byte Death sound index
|
||||
0040 byte Notice sound index
|
||||
0041 int32 Corpse triple - 0x00CCSSTT; zero for "none"
|
||||
0045 byte View count; for multi-view postures
|
||||
0046 byte Secondary attack probability
|
||||
0047 byte Disrupt probability
|
||||
0048 byte Treasure type
|
||||
0049 byte Hit effect -- 0x00: meat, 0x01: plant, 0x02: robot, 0x03: cyborg, 0x04: generic
|
||||
004A byte Attack key frame
|
||||
|
||||
`Perception` is a probability whether an AI detects hacker when visible during an AI interval.
|
||||
|
||||
The `projectile source height offset` is a vertical offset specifying from where projectiles should be launched.
|
||||
> This is set to some positive values for the Elite Guard and Mutated Cyborg, so that their projectils appear from their heads.
|
||||
|
||||
The `animation speed` specifies the time of a single frame of an animation. A value of `0xFF` means a time of approximately 0.9 seconds.
|
||||
|
||||
For all `sound indices`, a value of `0xFF` indicates "no sound".
|
||||
> No enemy has a sound set for being hurt in the main game.
|
||||
|
||||
`View count` determines how many frames are available per viewing direction. Cyberspace entities, as well as unused critters, have this set to `0x01`, all others have `0x08`. Changing these values messes up rendering of the critter, and/or all subsequent critters. The sequence of the corresponding images will have to be adjusted accordingly.
|
||||
|
||||
The `secondary attack probability` determines how likely the critter will use its secondary attack when close to the hacker. `0xFF` means always, `0x00` will have the critter use the secondary attack only when farther away.
|
||||
|
||||
The `disrupt probability` determines how likely the critter will be interrupted when being hit. `0xFF` means always, `0x00` will have the critter execute its attacks and movement without interruptions.
|
||||
|
||||
`Treasure type` is an enumeration value (ranging from `0x00` to `0x0E`), pointing into a hardcoded pool of possible loot. See below for the possible constants. The concrete loot is randomized accordingly.
|
||||
|
||||
The `attack key frame` value is an index into the attack animation, when the corresponding attack should take effect.
|
||||
|
||||
|
||||
**Critter Attack Info** (`CritterAttack` struct) (21 bytes)
|
||||
|
||||
0000 uint8 Damage type
|
||||
0001 uint8 Special damage type
|
||||
0002 [2]byte Unused
|
||||
0004 int16 Damage modifier
|
||||
0006 uint8 Offence value
|
||||
0007 uint8 Penetration
|
||||
0008 uint8 Attack mass
|
||||
0009 int16 Attack velocity
|
||||
000B uint8 Accuracy
|
||||
000C uint8 Attack range
|
||||
000D int32 Reload time, with 0x100 being approximately 0.9 seconds
|
||||
0011 int32 Projectile triple -- 0x00CCSSTT; zero for "none"
|
||||
|
||||
The `damage type` seems to be compatible with the damage type of [generic weapon info](../GenericWeaponInfo.md). Yet all damage types that affect hacker are handled equally; The two damage types `0x04` and `0x08` have no effect at all.
|
||||
> The main game only uses damage types `0x01` and `0x02` (and some combinations). `0x04` is also set for Diego as well as SHODAN, though this has no further effect.
|
||||
|
||||
The `offence value` is compared to the defence value of the target object. See [common properties](../../fileFormat/PropertyFiles.md#common-table) for details.
|
||||
|
||||
An `accuracy` of `0x00` will still have the critter hit, though not that often and with less damage.
|
||||
|
||||
The critter will want to get within the `attack range` to perform its attack.
|
||||
|
||||
|
||||
**Critter Properties Flags** (4 bytes)
|
||||
|
||||
0x00000001 Flying
|
||||
|
||||
> There are further constants defined, though not in use by the engine.
|
||||
> The properties file has some critters with flag `0x00000004` set, which indicated "small" critters.
|
||||
|
||||
|
||||
**Treasure Type Enumeration** (1 byte)
|
||||
|
||||
0x00 No treasure
|
||||
0x01 Humanoid
|
||||
0x02 Drone
|
||||
0x03 Assassin
|
||||
0x04 Warrior cyborg
|
||||
0x05 Flier bot
|
||||
0x06 Security 1 bot
|
||||
0x07 Exec bot
|
||||
0x08 Cyborg enforcer
|
||||
0x09 Security 2 bot
|
||||
0x0A Elite cyborg
|
||||
0x0B Standard corpse
|
||||
0x0C Loot-oriented corpse
|
||||
0x0D Repairbot
|
||||
0x0E Serv-bot
|
||||
|
||||
|
||||
#### Specific 3 Properties
|
||||
|
||||
These critters (`14/3/x`) are for cyberspace.
|
||||
|
||||
**Cyberspace Critters Specific Properties** (`CyberCritterProp` struct) (6 bytes)
|
||||
|
||||
0000 [3]byte Colour scheme
|
||||
0000 [3]byte Alternative colour scheme
|
||||
|
||||
The `colour scheme`s contain 3 palette indices from the game palette. The 'alternative' colours are used for critters attacking or being hostile.
|
||||
The index into this list comes from the geometry properties, specifically from the [Set Colour and Shade](../../media/Geometry#set-colour-and-shade) command.
|
||||
@@ -0,0 +1,89 @@
|
||||
## Level Critter Table (Class 14)
|
||||
|
||||
```L24``` is a table describing critters.
|
||||
|
||||
**Level Critter Entry** (46 bytes)
|
||||
|
||||
0000 [6]byte Level object prefix
|
||||
0006 [40]byte Level critter data
|
||||
|
||||
|
||||
**Level Critter Data** (40 bytes)
|
||||
|
||||
0000 int32 Pending Z-rotation. Values up to 0x608000 seen.
|
||||
0004 int32 Fixed forward velocity. Rare values of 0x0D000 and 0x090000 seen.
|
||||
0008 [2]byte Unknown, Unused
|
||||
000A int16 Hastiness. Values of 0x0050 and 0x0030 seen.
|
||||
000C int16 State timeout
|
||||
000E int16 Unknown - set to 0x0002 for a few critters.
|
||||
0010 int16 Unknown - set to arbitrary values.
|
||||
0012 [2]byte Unused
|
||||
0014 byte Roaming critter state
|
||||
0015 byte Primary critter state
|
||||
0016 byte Secondary critter state
|
||||
0017 byte Tertiary critter state
|
||||
0018 [6]byte AI coordinates A
|
||||
001E byte Always 0xFF
|
||||
001F byte AI coordinates B
|
||||
0020 [2]int16 Loot object indices
|
||||
0024 [2]byte Unknown, Unused
|
||||
0026 [2]byte Unknown, set only for a few roaming critters.
|
||||
|
||||
|
||||
```Pending Z-rotation``` is a rotation value that the critter wants to perform next. Only when this value is zero, it continues with its regular state.
|
||||
|
||||
```Fixed forward veloctiy``` is used for a few critters to give them a fixed forward speed. This speed can be different than their normal speed, and even make them slower than regular.
|
||||
|
||||
```Hastiness``` makes a few critter appear as if they were under the effect of a speedup-stimulant. Their actions, including their animations, are quicker.
|
||||
|
||||
```State timeout``` is an indicator on how long the critter will stay in this state. Observed only in "cautious" state.
|
||||
This time is reduced as long as the hacker is in the vicinity. When the time reaches zero, the critter becomes hostile.
|
||||
The time value is typically quite low. A few high values like 0x0062 have been observed.
|
||||
|
||||
```AI coordinates A``` and ```B``` appear to be some sort of coordinates. Changing them has no visible effect, so they may be scratch values for the AI, determining where to go next. They are used only for roaming critters.
|
||||
|
||||
```Always 0xFF``` must always be set to ```0xFF```, otherwise the critter is immediately hostile, regardless of where it is on the map. All critters in the main game have it set to ```0xFF```.
|
||||
|
||||
### Critter states
|
||||
|
||||
The state a critter is in is goverend by four bytes, which have meanings on their own, as well as combined effects. For simple cases, only the ```Primary critter state``` is used. This value is also the one modified by the "Set critter state" action.
|
||||
|
||||
A roaming critter has the ```Roaming critter state``` value set, and also needs other states to be set. Working combinations found so far are:
|
||||
* ```03 01 01 00```
|
||||
* ```02 01 01 00``` (not found in archive.dat)
|
||||
A critter only roams on its own if the hacker is within a radius of about 6 tiles.
|
||||
|
||||
A patrolling critter follows a path laid out by ```Critter AI Hint``` marker (See [traps](../12_Trap/levelTrapEntry.md#critter-ai-hints-1207)). The first marker of such a path must be referenced in the second ```loot object index```.
|
||||
> The only working example of such a critter is initially docile, and has a state combination of ```00 00 04 00```.
|
||||
|
||||
The ```Primary critter state``` holds the state the critter is currently behaving in. This state is also reported by the targeting tool.
|
||||
|
||||
**Primary Critter State** (1 byte)
|
||||
|
||||
0x00 docile
|
||||
0x01 cautious
|
||||
0x02 hostile
|
||||
0x03 cautious (?)
|
||||
0x04 attacking
|
||||
0x05 sleeping
|
||||
0x06 tranquilized
|
||||
0x07 confused
|
||||
|
||||
> Various combinations of the state values can be found in the main game. While they have different effects, their pattern is not clear.
|
||||
|
||||
**Critter Mood Enumeration**
|
||||
|
||||
0 Friendly
|
||||
1 Neutral
|
||||
2 Hostile
|
||||
3 Isolation
|
||||
4 Attacking
|
||||
|
||||
**Critter Orders Enumeration**
|
||||
|
||||
0 Guard
|
||||
1 Roam
|
||||
2 Sleep
|
||||
3 Patrol between two points
|
||||
4 Highway - Follow path
|
||||
5 No move (guarding without moving)
|
||||
Reference in New Issue
Block a user