Commit Graph

2538 Commits

Author SHA1 Message Date
Julio Cezar Silva
9315482fc4 Craft all 2022-08-12 00:47:48 +00:00
Samuel Keiffer
9112e2177a Merge branch 'vfoulon80/agent-behavior-tree' into 'master'
Refactor agent's behavior tree

See merge request veloren/veloren!3500
2022-08-11 20:46:14 +00:00
Isse
e81dade43f Fix compilation with worldgen turned off. 2022-08-11 20:27:25 +00:00
Vincent Foulon
b1baa09815
Address review comments 2022-08-11 21:15:46 +02:00
Joshua Barretto
602de267b1 Perform validation on all kinds of chat message 2022-08-11 11:11:33 +01:00
Joshua Barretto
4e103c433f Simplified and improved alias validation 2022-08-11 11:11:31 +01:00
Joshua Barretto
4d110a542c Improved banned words loading 2022-08-11 11:09:53 +01:00
Joshua Barretto
52bd7b2485 Added automod 2022-08-11 11:09:52 +01:00
IsseW
87821d5c1d force update counter 2022-08-09 19:22:09 +02:00
Isse
0471e78f41 spectate mode :D 2022-08-09 18:43:13 +02:00
Samuel Keiffer
8602a04e71 Merge branch 'floppy-DesertCity' into 'master'
DesertCity

See merge request veloren/veloren!3495
2022-08-08 09:58:19 +00:00
flo
5dd9991311 DesertCity 2022-08-08 09:58:18 +00:00
Imbris
d5b59c2bb7 Convert away from IdvStorage to mixture of VecStorage and DenseVecStorage 2022-08-08 00:38:20 -04:00
Vincent Foulon
c1dcb6e412
Fix missing translation key in interaction 2022-08-07 21:16:31 +02:00
Vincent Foulon
b82da6acdb
Reimplement !3508 2022-08-07 21:11:58 +02:00
Vincent Foulon
62568d2229
Add documentation 2022-08-07 20:54:09 +02:00
Vincent Foulon
3203051fc3
Move interaction-cancelling code in interaction behavior + includes missing fix from !3467 2022-08-07 20:54:08 +02:00
Vincent Foulon
4f53d055de
Reimplement !3467 + fix event being pushed in front of agent inbox 2022-08-07 20:54:07 +02:00
Vincent Foulon
6994b026b1
Remove unused import 2022-08-07 20:54:06 +02:00
Vincent Foulon
faf2b13ac1
Move recv_interactions into BehaviorTree + cleanup functions ^& warnings 2022-08-07 20:54:02 +02:00
Vincent Foulon
d105d7063c
Cleanup prof_span + finish unfinished module rename 2022-08-07 20:50:37 +02:00
Vincent Foulon
6fae4efd45
PoC: Refactor agent's behavior tree 2022-08-07 20:50:24 +02:00
juliancoffee
d000cc90a1 Migrate code to new i18n API 2022-08-06 21:56:01 +03:00
Vincent Foulon
8862258f61 Deny any interaction received during hostile_tree 2022-08-06 18:31:42 +00:00
Marcel Märtens
bfcc2cb802 Change the version number to 0.13 2022-07-23 14:06:08 +02:00
Forest Anderson
9d67deeeb7 Reverted removal of msg 2022-07-17 13:32:53 -04:00
tygyh
120ee6b6c0 Fix typos 2022-07-15 18:59:37 +02:00
tygyh
cbe4d9d807 Remove unused imports 2022-07-15 16:00:27 +02:00
tygyh
5e5698249b Remove unnecessarily qualified paths 2022-07-15 14:49:46 +02:00
Isse
1e3b5383cf Merge branch 'zesterer/better-rain' into 'master'
Better rain

See merge request veloren/veloren!3464
2022-07-13 23:25:33 +00:00
Joshua Barretto
f48665366b More lightning position variety 2022-07-13 21:45:37 +01:00
Isse
9edfbaa29d fix agent aggression when not recieving damage from attack 2022-07-13 19:46:48 +02:00
Joshua Barretto
25c55b6a25 Better rain performance, wetness 2022-07-13 18:34:34 +01:00
Socksonme
3f0f1c423c Small fixes 2022-07-12 21:01:47 +00:00
Joshua Barretto
4e854a28ff Fixed occlusion bias 2022-07-10 16:56:45 +01:00
Joshua Barretto
47b236b1f0 Better lightning rates, fixed shaders 2022-07-10 13:44:11 +01:00
Joshua Barretto
836fe2b1c6 Proper lightning 2022-07-09 01:59:18 +01:00
Joshua Barretto
6d1b46956d Better storms 2022-07-09 00:14:59 +01:00
Joshua Barretto
4531a4e3f9 Added lightning 2022-07-08 23:26:33 +01:00
Joshua Barretto
6c4b10d881 Use existing humidity 2022-07-08 20:18:07 +01:00
Joshua Barretto
28bc9db198 Better cloud cover 2022-07-08 18:09:13 +01:00
Marcel Märtens
e4909650e1 update hashbrown, specs, and tracy 2022-07-06 15:41:59 +02:00
IsseW
5a0cdc2528 add rain threshold that depends on chunk moisture 2022-07-04 18:18:43 +02:00
IsseW
80e29e2c20 put rain_density in uniform 2022-07-04 18:18:37 +02:00
IsseW
27ec6d7469 add weather_zone command 2022-07-04 18:18:33 +02:00
IsseW
121cf3becc Comment fixes 2022-07-04 18:11:44 +02:00
IsseW
fd12c8abdb Remove dead shader code, clean up weather.rs 2022-07-04 18:10:06 +02:00
DaforLynx
dc8424c549 Moving audio code 2022-07-04 18:10:05 +02:00
IsseW
6215ccd522 Remove dead code 2022-07-04 18:07:24 +02:00
IsseW
b82bb5b247 Don't have rain be behind an expiremental shader 2022-07-04 18:07:22 +02:00
IsseW
3eabe24f12 base occlusion texture size of off voxels 2022-07-04 18:07:19 +02:00
IsseW
6d40caed23 wind adjust 2022-07-04 18:07:17 +02:00
IsseW
54f958acc7 more correct occlusion 2022-07-04 18:07:16 +02:00
DaforLynx
83ee54001e Ambience slider; fix to utterances 2022-07-04 18:07:15 +02:00
IsseW
79cac935c8 Added rain occlusion 2022-07-04 18:07:11 +02:00
DaforLynx
ca815f25a1 merging some UI sfx from a now-dead branch
Merge part 2

merge part 3

Merge part 4

merge part 5
2022-07-04 18:07:07 +02:00
Joshua Barretto
48117988e1 Better rain threshold 2022-07-04 18:07:06 +02:00
Joshua Barretto
767093105f Rebalanced rain 2022-07-04 18:07:05 +02:00
Joshua Barretto
502145a6f9 Cloud movement is more prominent 2022-07-04 18:07:01 +02:00
Joshua Barretto
dc90d637c1 Smoother clouds 2022-07-04 18:07:01 +02:00
IsseW
273c5ed2f0 Temporary noise solution 2022-07-04 18:07:00 +02:00
IsseW
9c84a20cef better sim 2022-07-04 18:06:58 +02:00
IsseW
0c804af773 reasonable delta time 2022-07-04 18:06:58 +02:00
IsseW
78c1de19cf More accurate weather sim 2022-07-04 18:04:39 +02:00
IsseW
6585ef1513 weather dependant music 2022-07-04 18:11:43 +02:00
IsseW
b7c0196129 Server weather sim 2022-07-04 18:11:41 +02:00
Marcel Märtens
50d85940d8 implement a event channel that posts regular information on events for Participants 2022-07-03 21:21:59 +02:00
Samuel Keiffer
0bd08b1f9e Merge branch 'socksonme/rework_sct' into 'master'
Rework SCT

See merge request veloren/veloren!3126
2022-07-02 02:42:42 +00:00
James Melkonian
8439f3ef6d Wiring System Documentation and Refactoring 2022-06-29 20:28:09 +00:00
Socksonme
6a355c58f2 Remove instance from PoiseChange 2022-06-29 18:36:05 +03:00
Socksonme
f048600335 Add back old i18n + some small fixes
- Fix .filter() for combo_floater
- Rename sct_inc_dmg_accum_duration to sct_inc_dmg, as it was in the
  wrong place

to rebase
2022-06-29 17:31:58 +03:00
Socksonme
f6189a61f2 Address review - addendum
- `BlockFloater`s and `ComboFloater`s don't store the owner anymore,
  `ExpFloater` still does, however the field is used to prevent
  accumulating old floaters with new ones. This change also makes it so
  that if the client changes entity, they keep the old entity's
  floaters.
- The `combo_floaters` field is now `combo_floater` plus it now uses an
  Option<ExpFloater>.
- Changed `handle_health_change` to change the health even if the entity
  does not have a `Pos` or `Uid`, now uses `emit_now`combo_floater` plus
  it now uses an Option<ExpFloater>.
- Changed `handle_health_change` to change the health even if the entity
  does not have a `Pos` or `Uid`, now uses `emit_now`
- Changed some comments
2022-06-29 17:31:58 +03:00
Socksonme
2c5fd06d0b Address review
- Change hp_pulse to not be framerate dependent
- Change some of the HpFloater checks to be inside the find() function
- Remove unnecessary join
- Add back option for showing incoming damage + add option for
  experience accumulation
- Change `ExpFloater`s to not store the owner, as they are only shown
  for the player (will have to see if the implementation is correct so
  that it may be applied to the other floaters)
- Rename `Outcome::Damage` to `Outcome::HealthChange` and `DamageInfo`
  to `HealthChangeInfo`
- Update some outdated comments/documentation
2022-06-29 17:31:58 +03:00
socksonme
eabbfe6a51 Remove damage batch option + crit_mult 2022-06-29 17:31:54 +03:00
socksonme
3d2dcbf894 Revert some changes 2022-06-29 17:31:43 +03:00
socksonme
559d5ca804 Some changes to DamageSources + various code qual changes 2022-06-29 17:31:43 +03:00
socksonme
5360a7c93e Tons of code quality changes, added damage rounding option 2022-06-29 17:31:37 +03:00
socksonme
64f0f05608 Fixed bug with healing above 5.0 and preparing for options 2022-06-29 17:31:10 +03:00
socksonme
202d558246 Instance number generated inside projectile constructor, remove crit field 2022-06-29 17:31:07 +03:00
socksonme
6c75ad6ef8 Code quality changes and comments 2022-06-29 17:30:54 +03:00
socksonme
c0e78d869e Instance numbers are now based on the AttackDamage struct 2022-06-29 17:30:53 +03:00
socksonme
ac5bf53c42 Instance numbers for HpChanges 2022-06-29 17:30:50 +03:00
socksonme
f8924d6c1a tweaks to damage floaters
Added some comments where stuff needs to be discussed
2022-06-29 17:30:32 +03:00
socksonme
7a1e19d42c Crits now only glob with eachother, now show up like healing
Still a WIP, need to change crits to being non-floating and try implementing crits popping, need to remove some debugging stuff later
2022-06-29 17:30:29 +03:00
socksonme
ce95680df9 Addressed comments, health and damage floaters are now separated
Enemy healing probably needs to be discussed as it doesn't show up as of now and the way crits are handled also needs to be discussed
2022-06-29 17:29:59 +03:00
socksonme
94f193fbe0 Damage outcomes are now emitted with health change events
Being healed and damaged at the same time still leads to issues - needs to be sorted out
2022-06-29 17:29:19 +03:00
Sam
4a5ef6dce3 Poise damage dealt to a target in a stunned state is now no longer universally applied to the target as health damage.
Instead poise damage is only converted to health damage when its source is mitigated crushing damage.
Fixed 'Long Pole' -> 'Longpole'
2022-06-17 21:13:45 -04:00
Imbris
cd503a210e Remove tick_count since we can already get a count of ticks via
`tick_time_hist_count`.
2022-06-16 22:08:54 -04:00
Imbris
d5718fd410 Switch to counter of events and add tick counter 2022-06-15 19:25:00 -04:00
Imbris
950723dd0d Add metrics for counting server events 2022-06-15 00:40:58 -04:00
Samantha W
57ab1c5767 Add a client-side mutelist 2022-06-14 20:35:01 +00:00
Joshua Barretto
b555381677 Added server gameplay settings, ability to toggle explosion burns off 2022-06-14 14:24:08 +01:00
Isse
e03b733ad7 Owned mine loot 2022-06-12 17:56:59 +00:00
Christof Petig
39fafe646c add the missing files outside of world from shredded_economy4 2022-06-07 18:30:05 +02:00
N A
3d24ac79e3 make animal NPC's eat food on spot 2022-06-07 07:25:27 +00:00
terrarier2111
45efdb6602 Implement group owned loot 2022-06-04 17:16:12 +00:00
Ben Wallis
d71f2ff682 Fixed animals picking up non-owned non-consumable loot 2022-05-31 15:57:58 +01:00
Ben Wallis
ec1427d669 Added temporary fix to prevent loot drops causing a server crash in some (currently unknown) circumstances 2022-05-31 13:37:56 +01:00
Sam
5e57eabd11 Code changes and msm 2022-05-30 20:25:31 -04:00
N A
c09f070241 Change animal species to have only one inventory slot 2022-05-29 23:53:00 +00:00
Ben Wallis
34f580dfaa Introduced loot ownership rules to combat loot stealing by players
* Added `LootOwner` component used to indicate that an `ItemDrop` entity is owned by another entity
* A loot winner is now calculated after EXP allocation using the EXP per entity for weighted chance distribution
* Used existing Inventory Full overitem text to show "Owned by {player} for {seconds}secs" when a pickup fails due to a loot ownership check
* Updated agent code to take into account loot ownership when searching for `ItemDrop` targets to pick up
* Added `loot` ECS system to clear expired loot ownerships
2022-05-28 12:06:49 +00:00
StereoJunkie
3015b4a29d Non-humanoid picking up consumables when hungry 2022-05-27 16:57:53 +00:00
N A
d84a26dfd8 Special case taming and mounting. 2022-05-24 02:09:45 +00:00
N A
1f82dab948 NPC itemdrop picking up 2022-05-19 22:06:44 +00:00
Sam
534c7dc8b9 Simplified item key (no assets) 2022-05-18 16:28:06 -04:00
Sam
ed9bb7adae Added comments to persistence code 2022-05-17 19:05:43 -04:00
Sam
72f38068e0 Moved items from 'items.crafting_ing.modular' to 'items.modular.weapon' (no assets). 2022-05-16 15:11:44 -04:00
Sam
bcf36d08b0 Add removed items to migration. 2022-05-16 15:11:43 -04:00
Sam
54a6c31c63 Slight optimization to persistence 2022-05-16 15:11:42 -04:00
Sam
85c2a85817 Addressed review comments 2022-05-16 15:11:42 -04:00
Sam
c0dd748bc7 Addressed second round of balance feedback (no assets). 2022-05-16 15:11:40 -04:00
Sam
95c3fdffa1 Addressed playtest feedback (no assets). 2022-05-16 15:11:39 -04:00
Sam
e9f36b9486 Propagated errors in persistence when accessing mutable parent item for modular componnets. 2022-05-16 15:11:35 -04:00
Sam
64d07d02c4 Changed item definition id to better handle modular items. 2022-05-16 15:11:34 -04:00
Sam
37442b638c Changed component recipe book to generate some stuff automatically to avoid potential for stuff inside to become unsynced (no assets). 2022-05-16 15:11:33 -04:00
Sam
afd2c8730f Addressed most review comments (no assets). 2022-05-16 15:11:32 -04:00
Sam
816c265662 Rebase stuffs 2022-05-16 15:11:26 -04:00
Sam
e69aa8c4ee Fixed items with components having incorrect hashes 2022-05-16 15:11:24 -04:00
Sam
cb04433c14 Fix rebase 2022-05-16 15:11:22 -04:00
Sam
d436362a8d Consolidated crafting UI for the primnary component of modular weapons. 2022-05-16 15:11:21 -04:00
Sam
af50864643 Fixed issue in updating item config when loading persisted items. 2022-05-16 15:11:18 -04:00
Sam
bf348b7f43 Addressed further review. 2022-05-16 15:11:16 -04:00
Sam
94c19735ca Fixed broken stuff during rebase. 2022-05-16 15:11:16 -04:00
Sam
81c83c5e83 Items with components can now have their name modified by the components. Also addressed more review. NO ASSETS 2022-05-16 15:11:15 -04:00
Sam
259db56ca6 Addressed more comments in MR review. 2022-05-16 15:11:14 -04:00
Sam
d7f5b907ff Gave modular items a pseudo item definition id that can be used when serializing ItemBase or when persisting items to the database. ONLY ASSETS 2022-05-16 15:11:14 -04:00
Sam
fa9e034757 Gave modular items a pseudo item definition id that can be used when serializing ItemBase or when persisting items to the database. NO ASSETS 2022-05-16 15:11:13 -04:00
Sam
a9e9a70687 Changed ModularComponent to allow it to be more extensible. Overhauled random modular weapon function so that there is less runtime cost to generate one. NO ASSETS 2022-05-16 15:11:11 -04:00
Sam
b048179c0a Changed Item to have ItemBase instead of ItemDef. ONLY ASSETS. 2022-05-16 15:11:11 -04:00
Sam
08b7bb781f Changed Item to have ItemBase instead of ItemDef. NO ASSETS. 2022-05-16 15:11:10 -04:00
Sam
5bacf526ad Began addressing initial review of modular weapons. 2022-05-16 15:11:10 -04:00
Sam
00649f8ebb Added crafting method for modular weapons. 2022-05-16 15:11:04 -04:00
Sam
b7aa0a7a9f Rebase commit. 2022-05-16 15:11:04 -04:00
Sam
4f466d0523 Modular weapons now work in kits. 2022-05-16 15:11:03 -04:00
Sam
ca644f8f0b Added more interesting ingredients to recipes.
Changed bow main component from held (grip) to damage (limbs).
2022-05-16 15:11:02 -04:00
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
Marcel Märtens
affdf3131f update a bunch of dependencies, including clap3 2022-04-04 11:43:29 +02:00
flo
3d24b1d635 CliffTowns 2022-03-29 12:52:08 +00:00
holychowders
39d5a73c10 Fix deadwood not attacking if target is at a different elevation than deadwood. 2022-03-27 20:02:38 +00:00
Samuel Keiffer
4aaefdf6be Merge branch 'ubruntu/site2-guards-raiders' into 'master'
Bring raiders and guards to site2 towns

See merge request veloren/veloren!3300
2022-03-26 00:29:53 +00:00
ubruntu
6d30f7f748 Bring raiders and guards to site2 towns 2022-03-26 00:29:52 +00:00
Justin Shipsey
aee1aa7c1d Merge branch 'holychowders/prevent_undesired_movement_on_agent_interaction' into 'master'
Agent Perception: Improve Awareness System

See merge request veloren/veloren!3263
2022-03-26 00:28:18 +00:00
holychowders
a88d8ada0f Comment out unused awareness increment/decrement calls and un-nest conditional for early return. 2022-03-19 12:02:29 -05:00
James Melkonian
8c06dc9a5c Add chunk reload command (admin only) 2022-03-19 08:43:38 +00:00
Manuel Schmidbauer
0037518472 Impl #1357: Agent chase abort
- Adds util funcs to calculate benefit of continue pursue vs letting
target escape
- Hooks util funcs into agent's hostile tree
2022-03-14 18:06:57 +01:00
Imbris
06b605a8d0 Add note on reasoning in optional argument parsing behavior 2022-03-13 16:03:29 -04:00
Imbris
008e9051f7 Don't consume command args that fail parsing, so that optional args are properly skipped. 2022-03-13 15:41:37 -04:00
holychowders
c6bc6b63ee Prevent enemy agents from reacting to sounds from too far away and remove an inconsequential distance check. 2022-03-12 18:13:02 -06:00
holychowders
cc808251e6 Make Enemy agents flee from dangerous sounds instead of follow. 2022-03-12 16:58:06 -06:00
holychowders
3ffb1a7706 Also restrict when Enemy agents respond to sounds and fix potential conditional bug. 2022-03-12 16:58:06 -06:00
holychowders
8d98ade15e Agent perception: Make handling of sounds and awareness more intuitive.
When a sound was received in `idle_tree()`, awareness would be
incremented, causing a call to `handle_elevated_awareness()`, which
handled sounds heard. Instead, just `handle_sounds()` when they are heard and
increment awareness as part of hearing them.

The code more straightforwardly shows the agent first hearing a sound and then
becoming more aware based on that.
2022-03-12 16:58:06 -06:00
holychowders
df91f665d7 Agent Perception: Restrict when idling agents respond to sounds.
- Prevent utterances and other sounds from causing undesired jitters and
  fleeing, such as those caused by greeting villagers.
- Agents will no longer flee from quieter weapon sounds such as melee.
2022-03-12 16:58:06 -06:00
Samuel Keiffer
a411db17bf Merge branch 'tygyh/Refactor-path_toward_target' into 'master'
Tygyh/refactor path toward target

See merge request veloren/veloren!3241
2022-03-08 16:43:37 +00:00
Dr. Dystopia
1810998641 Remove redundant 'pos' variable 2022-03-05 09:54:01 +01:00
Dr. Dystopia
1cb7a083e7 Remove redundant if-statement 2022-03-05 09:53:28 +01:00
Dr. Dystopia
4aab1eea43 Remove redundant 'tgt_pos' variables 2022-03-01 22:54:44 +01:00
Dr. Dystopia
5aa1d3ceaf Rename 'vec3' parameter to 'pos_difference' 2022-03-01 22:47:01 +01:00
Dr. Dystopia
f99a637606 Rename 'dist_to_pos' variable to 'pos_diff' 2022-03-01 22:44:55 +01:00
Dr. Dystopia
50f877bdf6 Rename 'dist_to_pos_xy' variable to 'dist_xy' 2022-03-01 22:42:03 +01:00
Dr. Dystopia
83f46658a9 Fix pathing execution 2022-03-01 22:40:43 +01:00
Dr. Dystopia
0a3de57be6 Rename 'distance_to_target' variable to 'pos_difference' 2022-03-01 22:38:35 +01:00
Dr. Dystopia
4d24ff0027 Rename 'target_position' clojure to 'partial_path_tgt_pos' 2022-03-01 22:33:25 +01:00
ubruntu
94a9b407c2 Fix waypoints being movable 2022-02-28 19:20:37 +00:00
InfRandomness
042d258161 Modify message catch-all arms 2022-02-27 23:08:47 +00:00
Imbris
7be5b4c051 Merge branch 'imbris/fix-possesion-comp-sync' into 'master'
Improve possession edge cases

See merge request veloren/veloren!3233
2022-02-27 20:10:16 +00:00
Imbris
8742a37e0f Changes based on review. Fix tests. 2022-02-27 14:43:08 -05:00
N A
fc9c3c3be9 worth_choosing refactor 2022-02-27 19:21:21 +00:00
Imbris
e6c2239744 Fix typo. cargo fmt. 2022-02-27 13:47:13 -05:00
Imbris
e52159f638 Remove original character from game world when possessing to make persistence more robust. 2022-02-27 13:47:13 -05:00
Imbris
10803a9735 Stop using Character presence kind when possessing so that persistence doesn't get messed up. 2022-02-27 13:47:12 -05:00
Imbris
c2ad763b9c Handle removing/inserting SyncFrom::ClientEntity components properly during possession. 2022-02-27 13:47:12 -05:00
Imbris
63ed36bdde Limit possesse to regions which possessor is subscribed to. 2022-02-27 13:47:12 -05:00
Imbris
6f9ff17ce8 Properly handle cleanup of old entity controller during possession on both the client and server sides 2022-02-27 13:47:12 -05:00
Imbris
1a744808f0 Cleanup up possession code and add TODOs for issues to fix. Remove
SyncFrom debug_assertions hack.
2022-02-27 13:47:12 -05:00
Dr. Dystopia
7e70d7648e Dereference 'tgt_pos' variables 2022-02-27 10:36:01 +01:00
Dr. Dystopia
a39d514bae Replace 'tgt_data' parameter with 'tgt_pos' parameter 2022-02-27 10:19:45 +01:00
Imbris
fb2f731ac3 Small fix 2022-02-26 01:05:28 -05:00
Dr. Dystopia
75322ddfc0 Extract 'dist_to_pos' variable 2022-02-25 22:00:42 +01:00
Dr. Dystopia
ee26778118 Extract 'dist_to_pos_xy' variable 2022-02-25 21:57:29 +01:00
Dr. Dystopia
019d619cf6 Extract 'spacing' variable 2022-02-25 21:48:29 +01:00
Dr. Dystopia
15bea26823 Extract 'target_position' clojure 2022-02-25 21:44:43 +01:00
Dr. Dystopia
d921e1e3ea Extract 'pos' variable 2022-02-25 21:40:42 +01:00
Dr. Dystopia
e2d42207a4 Update 'path_toward_target' doc comment 2022-02-25 21:37:01 +01:00
Dr. Dystopia
4aebe19d94 Extract 'distance_to_target' variable 2022-02-25 21:35:50 +01:00
Dr. Dystopia
0dad86e1ca Replace flag parameters with 'Path' enum 2022-02-25 21:35:35 +01:00
Inojelis
9bdb7198f5 Fix imports 2022-02-21 03:46:02 +02:00
Inojelis
3e5a220980 Fix generate_chunk to also accept Calendar 2022-02-21 02:48:12 +02:00
Marcel
6506a97dcd Merge branch 'zesterer/enable-site2-towns' into 'master'
Enabled site2 towns by default

See merge request veloren/veloren!3206
2022-02-20 14:02:53 +00:00
Marcel
df7cd2da1a Merge branch 'isse/shared-waypoints' into 'master'
Shared and persistent waypoints

See merge request veloren/veloren!3162
2022-02-20 10:10:18 +00:00
Isidor Nielsen
a685a353cb Shared and persistent waypoints 2022-02-20 10:10:18 +00:00
Marcel Märtens
802b9e7914 Change the version number to 0.12 2022-02-18 22:36:53 +01:00
James Melkonian
7f21cbf4bc Fix airship command by splitting out ships 2022-02-18 08:34:14 +00:00
Joshua Barretto
34871c9355 List locations on empty command 2022-02-17 16:01:18 +00:00
Joshua Barretto
b786570470 Added location system, switched to release map 2022-02-17 14:51:59 +00:00
jshipsey
e569ee24c3 fix 2022-02-17 00:58:25 -05:00
Marcel
b09698b8ac Merge branch 'shouvik/prevent_empty_trades' into 'master'
Fixes #1452 - Prevents empty trades

Closes #1452

See merge request veloren/veloren!3202
2022-02-16 21:41:26 +00:00
ShouvikGhosh2048
d72f43190b Fixes #1452 - Prevents empty trades 2022-02-16 21:41:26 +00:00
Joshua Barretto
00b003a23c Enabled site2 towns by default 2022-02-15 19:01:43 +00:00
James Melkonian
c906c9e2dc Fix NPC humanoids not rolling when on fire 2022-02-15 08:28:37 +00:00
Samuel Keiffer
6c7c0eefae Merge branch 'gnarlings' into 'master'
Gnarlings

See merge request veloren/veloren!3194
2022-02-15 00:22:37 +00:00
Joshua Barretto
6e46b4ddef Fixed CI 2022-02-14 11:46:42 -05:00