Commit Graph

2203 Commits

Author SHA1 Message Date
Sam
3108f02566 Fixed migration to properly run 2022-05-16 15:11:02 -04:00
Sam
01450b7e34 Fixed migration to properly insert components in the correct position. Fixed small error in how names were generated for any modular weapon that used the held component as its main component. 2022-05-16 15:11:01 -04:00
Sam
a908eb5791 Made a few more changes to migration, removed additional weapon. 2022-05-16 15:11:01 -04:00
Sam
9776760f47 Updated stats on components and edited migration for 1 handed weapons to point to new target modular weapon. 2022-05-16 15:11:00 -04:00
Sam
db515f4448 Migration for modular weapons. 2022-05-16 15:11:00 -04:00
Sam
f3bf33506d Added creation of temp table in migration. 2022-05-16 15:10:59 -04:00
Sam
38cb465722 Fixed loading of modular weapons from the loadout to work with nested components.
Modular weapons can now be correctly dispalyed when wielded.
2022-05-16 15:10:57 -04:00
Sam
d380a2dbaf Quality is now propogated through modular items from the quality of the components. 2022-05-16 15:10:55 -04:00
Sam
405b9b2448 Modular weapons now have programmatically generated names. 2022-05-16 15:10:53 -04:00
Sam
4e89bc7485 Added test functions to assist in fixing unit tests that broke from changed functionality. 2022-05-16 15:10:52 -04:00
Sam
511f39c5ae Adds support for loading modular item from database with an arbitrary amount of component nesting. 2022-05-16 15:10:49 -04:00
Marcel Märtens
1b76874342 renamings and using unstable sort according to a code review 2022-05-11 21:50:41 +02:00
Marcel Märtens
637e63fbe2 switch from a Component to a Ressource with an Eventbus
Set CHUNK_SITE to 10 which results in a mean of 13ms per Slowjob. Its good if it stays under 30ms so it has less influence on ticks.
Some performance values measured with a AMD Ryzen 1700X:
 - voxygen and server and swarm (25 clients, 10 vd) on one machine.
 - total runtime was 240s
 - CHUNK_GENERATOR total time is 486s with a mean of 40ms
 - CHUNK_SERIALIZER total time is 18.19s with a mean of 13ms, so in total its a order of magnitude lower
   Trancy confirms this, the Serialize backlog is usually handled within 1-2 ticks.
 - terrain::sys total time 1.2s, mean 188us
 - msg::terrain::sys total time 812ms, mean 125us
 - terrain::sync total time 12ms, mean 1,85us
 - chunk_serialize::sys total time 69ms, mean 10us
 - chunk_send::sys total time 50ms, mean 7us

so all in all total time for serializsation is 20.33 of which 89% are spend outside of the ECS
2022-05-11 21:04:17 +02:00
Marcel Märtens
efe284a673 make the client request a few more chunks to compensate for the delay in serialisation 2022-05-11 20:22:24 +02:00
Marcel Märtens
8e47d02f8d add metrics and trigger slowjobs in chunks of 25 2022-05-11 20:22:23 +02:00
Marcel Märtens
9b53693783 switch to a system where chunk_serialize will start a SlowJow that is then consumed by chunk_send 2022-05-11 20:22:21 +02:00
Marcel Märtens
6c756c2440 first implementation of defering serialisation 2022-05-11 20:22:19 +02:00
Joshua Barretto
d530c29d98 Fixed LoD on test worlds 2022-05-11 19:06:41 +01:00
Joshua Barretto
e02f8aee65 Merge branch 'zesterer/lod-objects' into 'master'
LoD Objects (inc. Trees)

See merge request veloren/veloren!3367
2022-05-11 14:56:12 +00:00
Samuel Keiffer
1bd33bb997 Merge branch 'holychowders/streamline_stealth_coefficient' into 'master'
Distinguish armor and sneaking stealth; Show stealth as percentage in Stats UI.

Closes #1525

See merge request veloren/veloren!3352
2022-05-10 11:41:49 +00:00
Joshua Barretto
f35c98d1a1 Added LoD distance setting 2022-05-10 12:40:06 +01:00
Joshua Barretto
b3126ca687 Initial implementation of LoD trees 2022-05-10 12:38:36 +01:00
IsseW
022fa3d556 Clamp chances for gen bool in agent.rs 2022-05-10 08:44:26 +02:00
Forest Anderson
cea55143ce Change outcomes to eventbus 2022-05-09 19:58:13 +00:00
holychowders
e473c47bcf Distinguish stealth from armor and stealth from sneaking. Also fixes #1525.
- Armor and sneaking have exclusive effects on overall stealth, rather
  than armor taking effect only while sneaking.

Gameplay:
- Agents factor in stealth from armor in all cases, not only when sneaking.
- Max stealth takes place when sneaking (final multiplier of `0.7`) and with stealth from armor up to `0.7` (`0.3` multiplier), resulting in a max distance modifier of about `0.5`, approximately what it was previously.
- Min stealth score from armor is now 0 instead of 2.

Internals:
- Stealth getter accounts for sneaking in final calculation, not just
  armor.
- Prevents potential division by zero.
- Stealth getter returns value that should be multiplied instead of divided.
- Legitimized stealth as a score between 0 and 1.

Notes:
- FIXME: Someone more familiar with the different armor types may want to adjust their stealths.
  - Armor stealths seem to be valued between `0.0` and `1.0`, and I've reinforced this in the code. However, it is possible, particularly for the `Dragonscale` armors, to cumulatively reach a value of `2.0`.
2022-05-06 13:15:46 -05:00
holychowders
9c68fbbeed Fix agents not hearing sounds due to reduced listen_dist, caused by commit a6955e5af.
- `listen_dist` has been restored to normal and the behavior intended by
  the trouble commit has been much more properly encoded.
2022-05-04 21:22:19 -05:00
Marcel
84ab219cf3 Merge branch 'xMAC94x/update-toolchain' into 'master'
update toolchain to `nightly-2022-04-25`

See merge request veloren/veloren!3343
2022-05-03 14:07:49 +00:00
Marcel Märtens
697673bcca update toolchain to nightly-2022-04-25 2022-05-03 15:22:28 +02:00
Samuel Keiffer
3abba05fb8 Merge branch 'holychowders/improve_perception_system' into 'master'
Agent: Use FOV when scanning for hostile targets and refactor `choose_target()`.

See merge request veloren/veloren!3307
2022-05-02 22:45:14 +00:00
Marcel
593d8fa4b5 Merge branch 'xMAC94x/update_vek' into 'master'
switch to upstream vek again

See merge request veloren/veloren!3342
2022-05-02 08:34:21 +00:00
holychowders
eab010b8c4 Change can_see_entity() parameter ordering to be consistent with other action nodes.
- Moved `agent` and `controller` to front.
2022-05-01 19:18:44 -05:00
holychowders
f2b5ea600e Revert parameter re-ordering of flee() (included in commit 9b6616fc0) to be consistent with other action nodes. 2022-05-01 19:18:44 -05:00
holychowders
a6955e5afb Re-add listen_dist check in choose_target() and add randomness to simulate agents detecting entities directly behind them. 2022-05-01 19:18:43 -05:00
holychowders
17f7353083 Move more expensive perception check below validity check in filter; Reduce number of component fetches. 2022-05-01 19:18:42 -05:00
holychowders
5d78294141 Pass positions and bodies into entities_have_line_of_sight() instead of fetching within. 2022-05-01 19:18:42 -05:00
holychowders
706ec91e69 Fix: Add alignment passivity check in is_enemy(). 2022-05-01 19:18:25 -05:00
holychowders
97e0e39887 Reduce function names and remove unnecessary component fetch from function. 2022-05-01 19:05:28 -05:00
holychowders
455cab0ee7 Address code review. 2022-05-01 18:44:10 -05:00
holychowders
995504be26 Have line-of-sight checks explicitly account for eye-height for entities. 2022-05-01 18:23:27 -05:00
holychowders
dda85e4bc3 Address code review. 2022-05-01 18:23:23 -05:00
holychowders
645bbf7b0d Refactor: re-order function signature to make more sense. 2022-05-01 17:30:23 -05:00
holychowders
d3873e357e Agent: Use FOV when scanning for hostile targets and refactor choose_target().
- Refactors `choose_target()`, renaming it and extracting functions with more meaningful names and more correct behavior.
- Adds FOV for agents scanning for hostile targets.
2022-05-01 17:29:45 -05:00
holychowders
914b44c714 Fix villagers seeing cultists and familiar enemies through objects. 2022-05-01 15:06:43 +00:00
Marcel Märtens
fa49248c31 switch to upstream vek again 2022-04-28 09:10:55 +02:00
Youssef Fahmy
aec866e5ec Balance tweaks 2022-04-23 14:54:01 +00:00
holychowders
cc409fd537 Extract some retargeting logic. 2022-04-11 11:54:09 -05:00
James Melkonian
b590bc50d7 Fix #1516 Add else branch to allow for agent idling when no sound events 2022-04-05 03:40:26 +00:00
Marcel
50fd55daef Merge branch 'tormod-personalities' into 'master'
Give NPCs random Big Five personalities.

See merge request veloren/veloren!3280
2022-04-04 19:03:05 +00:00
Tormod G. Hellen
cb88648cca Give NPCs random Big Five personalities. 2022-04-04 20:17:50 +02:00
Marcel Märtens
64b9602760 update further dependencies, including strum and get rid of old strum_macro 2022-04-04 16:06:47 +02:00