Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
59 stars 47 forks source link

Combat memories #1177

Open Nmls021 opened 1 year ago

Nmls021 commented 1 year ago

Memory flags in combat are not compatible with sphere_defs. What I've found that npcs using weird memory flags - memory_speak (040) instead of memory_fight (04) when it starts attack ; memory_irritatedby (020) instead of memory_harmedby (01) when it receives hit ; and memory_aggreived (080) instead of memory_iagressor (08) when it gets hit without attacking. For some reason sometimes its losing some of these flags, but have not discovered yet why and when.

update: When i send npc manually through scripts with command attack, it receives mem_flags correctly so 0b.

canerksk commented 1 year ago

https://github.com/Sphereserver/Scripts The script pack in its repo is not compatible with X1 and is not up to date. Instead, choose the script pack in the https://github.com/Sphereserver/Scripts-X repo or use the def definitions in Scripts-X on your own server.

Nmls021 commented 1 year ago

Mem_flags are still same in this repo so i do not think it solves the problem

GladieUO commented 1 year ago

I remember someone from veterans explaining to me that this PORT was not finished due to forgoting it or complicate change, so it was kept in old way.....

canerksk commented 2 months ago

tr;

Memory mantığı çok garip, Memory link üzerinden çalışıyor yani örneğin bir varlığa hem MEMORY_FIGHT hem MEMORY_IAGGRESSOR hem MEMORY_HARMEDBY memorysi var bunlar için ayrı ayrı memory oluşturmuyor bu güzel tarafı. ve bu memoryler o kişiye ait bir memory varsa onun üzerinde birleşiyor yani örneğin

X oyuncusuna saldırdım ve benim üzerime MEMORY_FIGHT = 0x0004 (mavi) yani mavi renkte bir memory geldi, ben bu kişiye crim oldum bu sefer aynı memory üzerine örnek veriyorum MEMORY_IAGGRESSOR = 0x0008 (mor) daha eklendi ve bunun rengi 04 + 08 yani 012 (pembe) oldu her bir renk için ayrı zaman var örneğin bir memorynin süresi 30 saniye ve o memory de iki renk tanımlı, bu itemin Timer'ini sıfır yaptığımızda muhtemelen silinmeyecektir bir önceki flagın süresini saymaya devam edecektir ta ki memory eşyasının üzerinde renk yani memory flagı kalmayana kadar. İşte tam olarak burada işler karmaşık hale gelmeye başlıyor. Aslında 0x0040 olan memory MEMORY_SPEAK'e eşittir diye bir durum söz konusu değil:

Bu MEMORY_IRRITATEDBY (0x0020) + MEMORY_HARMEDBY (0x0010) + MEMORY_IAGGRESSOR (0x0008) + MEMORY_IPET (0x0002)

yani 20 + 10 + 8 + 2 = 40 da olabilir, bu birden fazla memory flagının toplamı da olabilir.

Tabi ki bu memory flaglarının gruplandırması var mı tam olarak hangi memory flagları tek bir memory eşyasında birleşiyor hangileri ayrı ayrı ekleniyor onu bilmiyorum.

en;

The memory system is quite strange; it works through a memory link. For example, an entity can have both MEMORY_FIGHT, MEMORY_IAGGRESSOR, and MEMORY_HARMEDBY at the same time. It doesn't create separate memories for each, which is the nice part. If there is a memory for that person, these memories are combined onto it. For example:

I attacked player X, and I got MEMORY_FIGHT = 0x0004 (blue) on me, meaning a blue-colored memory appeared. Then I became a criminal to this person, and this time, MEMORY_IAGGRESSOR = 0x0008 (purple) was added to the same memory. The color then became 04 + 08, which equals 012 (pink). Each color has a separate timer; for example, a memory may have a duration of 30 seconds, and that memory may have two colors defined on it. When we set the timer of this item to zero, it probably won't be deleted; it will continue counting the time of the previous flag until there is no color, i.e., memory flag, left on the memory item. This is where things start to get complicated. In fact, there is no situation where 0x0040 equals MEMORY_SPEAK:

This could also be MEMORY_IRRITATEDBY (0x0020) + MEMORY_HARMEDBY (0x0010) + MEMORY_IAGGRESSOR (0x0008) + MEMORY_IPET (0x0002),

meaning 20 + 10 + 8 + 2 = 40; it could be the sum of multiple memory flags.

Of course, I'm not sure if there is a grouping of these memory flags or which memory flags combine into a single memory item and which ones are added separately.