Commit graph

103 commits

Author SHA1 Message Date
Zynerji
acbced8b75
Fix 16-bit texture decode: A4R4G4B4 and R5G6B5 (#4480)
Both formats expanded their packed channels with arithmetic that cannot
reach the top of the 8-bit range.

A4R4G4B4 used `nibble / 0xF * 255` in integer arithmetic. nibble / 15 is
0 for every nibble 0..14 and 1 only for 15, so all four channels - alpha
included - snapped to 0 or 255. In practice every affected texture
decoded to a single flat colour with binary alpha. Measured on a
CustomDM dat set, distinct colours and distinct alpha levels per texture
before -> after:

  06007068    1 ->  14 colours,   1 ->  1 alpha
  0600926C    1 ->  40 colours,   2 -> 15 alpha
  0600926E    1 ->  54 colours,   2 -> 16 alpha
  06009340    1 ->  70 colours,   2 ->  9 alpha
  06006430    1 ->   1 colours,   2 -> 11 alpha

255 / 15 == 17 exactly, so multiplying the nibble by 17 maps 0..15 onto
0..255 with no rounding error. The alpha nibble is now masked for
symmetry with the other three.

R5G6B5 expanded with a bare left shift, mapping a 5-bit value onto
0,8,16..248 and a 6-bit value onto 0,4,8..252. Neither reaches 255, so a
fully saturated white decoded to (248,252,248) - slightly dark and
slightly green tinted, since green keeps one more bit. Replicating the
high bits into the low ones spans the full range. Measured before ->
after on four textures whose brightest pixel is white:

  06006402, 06006404, 0600641D, 060096C0
  (248,252,248) -> (255,255,255)

and partial-range textures scale correspondingly, e.g. 06009694
(216,36,248) -> (222,36,255).

Affects every consumer of ACE.DatLoader that renders or exports
textures.
2026-08-13 01:04:08 -04:00
trevis
fe58e0c917
Add DataCategory / TextureType to dat RenderTexture obj (#4308) 2025-05-06 11:32:58 -04:00
trevis
8c6cf5ff50
- Added MaximumSameCharactersInARow to dat NameFilterTable. (#4307)
- Updated NameFiltertable.ExtraAllowedCharacters to be a string
2025-05-06 11:32:47 -04:00
OptimShi
9864887263
DatReader - ActionMap (#4217)
* Added ActionMap Dat reading 0x26000000

* Removed debug code from startup
2024-08-20 19:26:08 -04:00
OptimShi
ed7af65f9a
Added Dat structures and tests for UILayout and DbProperties (#4208) 2024-08-13 14:45:30 -04:00
gmriggs
0c81fb2ca7
fix EnvCell header comment (#4049) 2023-09-24 02:58:02 -04:00
Ty Conner
ab54cf9002
Add support for client DAT patching from server (#3979)
* Update DatFile.cs

* Update DatFileType.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create DDDManager.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create GameMessageDDDBeginDDD.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create GameMessageDDDDataMessage.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update DDDHandler.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update WorldManager.cs

* Update Program.cs

* committing changes provided

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* more wip changes

* Update DDDManager.cs

* Update DDDManager.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update CMostlyConsecutiveIntSet.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update WorldManager.cs

* Update DDDHandler.cs

* Update Session.cs

* Update DDDManager.cs

* Update Session.cs

* Update DDDManager.cs

* Update DDDManager.cs

* Update GameMessageDDDDataMessage.cs

* Update DDDHandler.cs

* Update Session.cs

* Update CAllIterationList.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update CMostlyConsecutiveIntSet.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Create PTaggedIterationList.cs

Co-Authored-By: OptimShi <OptimShi@users.noreply.github.com>

* Update Session.cs

* Update ConnectionListener.cs

* Create DDDConfiguration.cs

* Update MasterConfiguration.cs

* Update Config.js.example

* Update DDDManager.cs

* Update DDDHandler.cs

* Update Program.cs

* Update PropertyManager.cs

* Update WorldManager.cs

* Update SessionTerminationReason.cs

* Update DDDHandler.cs

* Update DDDManager.cs

* Update ConnectionListener.cs

* Update SessionTerminationReason.cs

* Update GameMessageDDDDataMessage.cs

* Update AuthenticationHandler.cs

* Update CharacterHandler.cs

* Update PacketInboundLoginRequest.cs

* Update Session.cs

* Update DatFileType.cs

---------

Co-authored-by: OptimShi <OptimShi@users.noreply.github.com>
2023-06-09 13:15:10 -04:00
OptimShi
da76e6e995
Added support for parsing MasterProperty, 0x39000001 in the client_portal.dat (#3970)
* Added support for parsing MasterProperty, 0x39000001 in the client_portal.dat.

* Removed skipping of MasterProperty in DatLoader.Test
2023-04-10 05:45:09 -04:00
Ty Conner
9cc7f836dd
Wire up support for RotationSpeed (#3745)
* Wire up support for RotationSpeed

Co-Authored-By: gmriggs <8909245+gmriggs@users.noreply.github.com>

* Cache HasMissileFlightPlacement in Setup

Co-authored-by: gmriggs <8909245+gmriggs@users.noreply.github.com>
2021-11-28 13:11:36 -05:00
gmriggs
570be5f784
attack hook selects body part (#3441)
* attack hook selects body part

* fix error for monsters wielding weapons
2021-05-22 15:54:18 -04:00
Mag-nus
76d15ba83e
Fix LanguageString (#3196)
This is from OptimShi. I verified the string is now correct. Interestingly enough, tests still passed before with truncated strings.

All tests still pass
2020-09-02 07:12:57 -05:00
Mag-nus
f14f91a47c
Add DatLoader.Tests for client_local_English.dat (#3193)
* Update DB_TYPE_RENDER_MESH

from acclient.c

const unsigned int DB_TYPE_RENDER_MESH = 67u; // idb

* cosmetic

* cosmetic

* Improve Datloader.Tests

* cosmetic

* Add DatLoader.Tests for client_local_English.dat

This builds on pr #3191

all tests pass
2020-09-01 20:06:29 -05:00
Mag-nus
e24b42827b
Fix DatLoader.Tests (#3191)
* Update DB_TYPE_RENDER_MESH

from acclient.c

const unsigned int DB_TYPE_RENDER_MESH = 67u; // idb

* cosmetic

* cosmetic

* Improve Datloader.Tests

* cosmetic
2020-09-01 19:59:47 -05:00
gmriggs
336c312e5f
adding attack frame cache, adding warning / defaults for missing attack frames (#3144)
* adding attack frame cache, adding warning / defaults for missing attack frames

* adding AttackFrameParams

* removing AttackFrameParams, updating to 2-tiered dictionary of uint, ulong

* .

* Revert "."

This reverts commit d706a32202.

* Revert "removing AttackFrameParams, updating to 2-tiered dictionary of uint, ulong"

This reverts commit dd1327105f.

* monster HashSet -> ConcurrentDictionary
2020-08-26 11:04:59 -04:00
OptimShi
9e20ea24d5
Corrected colors for PFID_CUSTOM_LSCAPE_R8G8B8 type textures (#3004) 2020-06-04 12:56:20 -07:00
OptimShi
dd8ab66198
Dat file iteration checking (#2992)
* Added dat file Iteration checking to server files
* Handled DDD_InterrogationResponse to check clients connecting for up-to-date dat files and display a warning upon login.
* Use command "modifybool show_dat_warning true" to show warning to clients upon login.
* Fixed ACE.Server.Network binaryReader.Align() function.
2020-05-23 10:23:45 -07:00
gmriggs
bd74037d1f
more CMT fixes for players (#2946)
* more CMT fixes for players

* fix typo
2020-04-18 16:15:29 -04:00
gmriggs
eaae136e60
improve house root guid (#2889) 2020-04-08 00:43:03 -04:00
gmriggs
d195a563b6
monster combat maneuvers table updates (#2578) 2020-01-01 01:11:04 -05:00
gmriggs
2307c00da7
better usage of body part quadrants for physical attacks (#2571)
* adding preliminary support for dual-wielding monsters

* fixing monster special attack fx

* improved monster combat maneuvers table

* adding dual wield speed modifier for mobs

* fixing mobs casting flame wave

* adding support for EmoteManager.CastSpell untargeted spell projectiles

* fixing untargeted Blast spells

* fixing blast spells

* fixing spell z-angle

* re-add Emote.Move* physics position sync w/ valid rotation check

* wip

* latest wip

* cleanup

* small position adjustments

* matching create.Y formula up to retail pcaps

* refactoring spell projectiles

* startPos based on targetPos instead of casterPos for strike spells?

* improved strike spawn position

* add error logging

* add support for peturbation, improve ring positioning for even # of projectiles

* adding /clearcache for content developers

* fixing boost variance

* adding quadrant stuff

* splatter dir

* better usage of body part quadrants for physical attacks

* found CMTs with multiple entries per lookup key, cycle through anims

* fixing portal gems
2019-12-31 01:56:07 -05:00
gmriggs
881184a8c3
adding preliminary support for dual-wielding monsters (#2558)
* adding preliminary support for dual-wielding monsters

* fixing monster special attack fx

* improved monster combat maneuvers table

* adding dual wield speed modifier for mobs
2019-12-31 01:38:38 -05:00
gmriggs
1e960de4f2
improved monster combat maneuvers table (#2560)
* fixing monster special attack fx

* improved monster combat maneuvers table

* found CMTs with multiple entries per lookup key, cycle through anims

* reset PrevMotionCommand / DualWieldAlternate each time attack height button is clicked
2019-12-31 01:31:31 -05:00
gmriggs
eb6579d01f
refactoring raise attribute/vital/skill, fixing security issues with them (#2483)
* cleanup playscript

* refactoring raise attribute/vital/skill, fixing security issues with them

* fixing some issues with proficiency xp
2019-12-05 02:54:58 -05:00
gmriggs
b9ed09c1b2
improved player melee attack animations (#2176)
* improved player melee attack animations

* re-adding override

* fixing some stance swapping bugs
2019-08-02 10:25:27 -04:00
OptimShi
ca79907edd
Layering (#2158)
* WIP

* Functional

* Review
2019-07-25 09:20:42 -07:00
gmriggs
d49a4a0bad
log cleanup (#2053) 2019-06-27 00:37:00 -04:00
gmriggs
114888ed9e
fixing highframe bug (#2023) 2019-06-21 04:14:46 -04:00
OptimShi
14a07587b0
Fix GetPaletteID function (#1962) 2019-06-04 09:14:12 -07:00
gmriggs
dbaaec0ce3
Fixing monster retired skill #s (#1817)
* Fixing monster retired skill #s

* moving AddRetiredSkills
2019-04-28 01:30:45 -04:00
OptimShi
2dd510ca05 Dat update (#1509)
* WIP

* Updated changelog

* Update changelog.md
2019-03-09 19:51:03 -06:00
gmriggs
4c7eceaea8
Adding house deeds, purchase requirements w/ config options (#1426)
* Adding house deeds, purchase requirements w/ config options

* Changing AllegianceMinLevel to optional config prop
2019-02-07 16:39:30 -05:00
gmriggs
d4f9368641
Improving per-animation attack frame timing for players and monsters (#1177)
* Improving per-animation attack frame timing for players and monsters

* Appending EnchantmentTypeFlags for item buffs, fixing /tell for admin players

* .

* Fixing /tell +Admin issue in PlayerManager
2018-12-23 17:32:21 -05:00
gmriggs
49bb0ff7e8
Improving /tele and minimap click teleporting (#1157)
* Improving /tele and minimap click teleporting

* Updating patch
2018-12-20 07:49:03 -05:00
gmriggs
14591666d8
Adding spell component burning (#1121)
* Adding spell component burning

* Some adjustments
2018-12-13 00:22:19 -05:00
Mag-nus
3e836a6cbb
Profiling based improvements (#1115)
* Use PortalDat skill table instead of reflection properties

* Update showstats comments

* remove attributes from Skill enum (Values now come from dat)

* Remove attributes from PropertyAttribute2nd (Values come from dat now)

* Landblock, worldObjects to private and adjacents->Adjacents

* Landblock remove PhysicsObj != null check. No need. 6% CPU savings

* showstats shows [Unusable] for untrained skills which are unusable

* Improve performance of GetWorldObjectsForPhysicsHandling

* Improve Skill IsUsable

* Updating showstats

* Fixing null pointer exception in IsUsable
2018-12-03 17:53:32 -06:00
gmriggs
7ab6311ac6
Some DatLoader updates (#1110)
* Some DatLoader updates

* commenting filetype

* Adding 0xE filetypes
2018-12-02 12:49:52 -05:00
OptimShi
e6937b3e68 Added three new dat FileTypes (#1106) 2018-11-28 23:52:14 -05:00
gmriggs
97cf4ec299
Updating audio export (#1105)
* Updating audio export

* .
2018-11-27 01:15:34 -05:00
gmriggs
b215a34ce7
Improving DatLoader for third-party apps (#1092)
* Improving DatLoader for third-party apps

* Adding some missing filetypes (thanks OptimShi!)

* Adding more enums, using SmartArray

* Re-adding loadCell

* Reverting to UInt32
2018-11-22 01:33:17 -05:00
gmriggs
811956ef55
Updating particle system (#1089)
* Updating particle system

* Updating GetRandomStartTrans

* Updating IsParentLocal

* Reset lifetime
2018-11-08 14:43:38 -05:00
gmriggs
1e6af06ef6 Adding particle emitters (#1082) 2018-11-01 02:55:11 -04:00
gmriggs
4619970f80
Refactoring LandblockManager, improving VitalTick performance (#1079)
* Physics Cache cleanup (Mostly cosmetic)

* Vertex/Polygon/BSP CacneEnabled flags added, default to false

Testing results:

Debug mode, loading 31,329 landblocks (x = 0x20-0xD0, y = 0x20-0xD0)

With Vertex, Polygon & BSP Cache:
2018-10-25 10:05:12,121 DEBUG: Loaded Landblocks in 120.39 seconds
2018-10-25 10:05:12,218 DEBUG: 13759 MB used

2018-10-25 10:08:00,330 DEBUG: Loaded Landblocks in 101.11 seconds
2018-10-25 10:08:00,427 DEBUG: 13667 MB used

2018-10-25 10:13:08,448 DEBUG: Loaded Landblocks in 104.36 seconds
2018-10-25 10:13:08,507 DEBUG: 13666 MB used

With Vertex, Polygon & BSP Cache Disabled:
2018-10-25 10:17:55,339 DEBUG: Loaded Landblocks in 100.63 seconds
2018-10-25 10:17:55,404 DEBUG: 14175 MB used

2018-10-25 10:21:11,596 DEBUG: Loaded Landblocks in 89.23 seconds
2018-10-25 10:21:11,666 DEBUG: 14220 MB used

2018-10-25 10:27:22,145 DEBUG: Loaded Landblocks in 93.74 seconds
2018-10-25 10:27:22,200 DEBUG: 14206 MB used

* PhysicsCaches, remove redundant null check

* Improved GfxObjCache model

* DBObj Boxing/Unboxing improvements

* Add thread safety to GfxObjCache

* Landblock phsyics loading async

* Adding setup "caching"

* Redirecting properties to DatLoader

* Refactoring LandblockManager, resolving Physics Landblock loading bug

* Tabs vs. spaces

* Improving VitalTick performance

* Adding refactored AttributeFormula to CreatureSkill

* Disabling BSP cache
2018-10-28 09:56:48 -04:00
gmriggs
0318370c93
Improved monster animations / timers for ranged attacks (xbow) (#991) 2018-09-03 03:27:48 -04:00
gmriggs
a23b03c510
Adding thrown weapons, atlatls, and monster wielded weapons (#980)
* Adding thrown weapons, monster wielded items WIP

* Adding atlatls

* Adding monster melee weapon damage

* Removing debug message

* Implemented monster inventory / weapon switching

* Removing debug lines

* Removing debug output

* .
2018-09-01 02:59:27 -04:00
OptimShi
b694a9991b AdjusSpell Words (#876)
* Tweaked Spell Words

* ChangeLog
2018-07-17 19:25:38 -05:00
OptimShi
6a9dd34596 Fixed Spell Formulas (#872) 2018-07-13 21:38:10 -07:00
gmriggs
e1ff1c8cc1 Fixing sliding along the edge of cliffs (#860)
* persistent tracking of item affectance
item affectance is restored at Player.EnterWorld

* Fixing sliding along the edge of cliffs

* Reverting item affectance PR
2018-07-10 06:44:42 -07:00
OptimShi
eebbe44309 Image Export (#852)
* 99% images, 50% image formats

* Image Export Functions
2018-07-09 08:56:32 -07:00
OptimShi
cad0e661d0 Dat updates (#847)
* Fix Replace Animation Hook

* SoundTable

* Numerous Dat Updates

* Added highres and language export commands
2018-07-05 07:50:42 -05:00
OptimShi
795633a2a3 Added Spell Sets to DatLoader.SpellTable (#841) 2018-07-03 06:59:56 -07:00