Server icon indicating copy to clipboard operation
Server copied to clipboard

[Feature] Splash Factions

Open mackal opened this issue 2 years ago • 7 comments

This is based on theories that have been formulated by several people about how factions are actually linked.

You get hit in one faction and you "splash" the others.

From the QuestReward packet we know they just use the faction ID and the value that faction is hit with, the rest follow, ALWAYS in the same ratio (sometimes hard to see with lower values since they min cap to abs(1) for a change)

This should be 100% compatible with current system and just be something to opt in.

This will allow us to use QuestReward to handle pretty much everything, exactly like live does :)

I will eventually work through what I can on PEQ and add an optional SQL that's a dump of the ratios I've been able to figure out.

mackal avatar Aug 01 '22 01:08 mackal

The trigger for using the newer system is if faction amount is set in the various places, otherwise old system is still used.

mackal avatar Aug 01 '22 01:08 mackal

The design of the splash_faction table is kind of meh, but it gets the job done and isn't needlessly complex for emulating live

mackal avatar Aug 01 '22 01:08 mackal

https://github.com/ProjectEQ/projecteqquests/blob/a3f6750bc075c674eb35d2b2f6bb17efcb274859/barindu/%23Njanu_Dinari.lua#L7 example of a quest we currently are calling QuestReward and then HAVE to manually edit factions, this allow us to handle it all in QuestReward

https://github.com/ProjectEQ/projecteqquests/blob/a3f6750bc075c674eb35d2b2f6bb17efcb274859/akanon/Baxok_Curhunter.lua#L40 Another example where we are currently making 8 quest calls that should just be a single QuestReward. (Currently that example we could make 3 of them into a single QuestReward)

mackal avatar Aug 01 '22 01:08 mackal

Figured I should give an example of a splash_faction entry, using Baxok Curhunter as an example:

INSERT INTO `splash_faction` (id, splash_id1, splash_mod1, splash_id2, splash_mod2, splash_id3, splash_mod3, splash_id4, splash_mod4) VALUES (255, 288, 0.25, 333, 0.25, 238, -0.25, 1604, -0.05);

Then for the Recruitment Summons QuestReward with provide faction 255 and 100. The other quest he has if we look on alla, the faction reward should actually be 255 with 20

mackal avatar Aug 01 '22 14:08 mackal

Overall , I like @mackal 's approach to keep things separate rather than merging into an existing table. At one point, I also did a redesign of the tables, but it would have had such a large impact on existing tools, code, even the quest API that I let it be.

noudess avatar Aug 02 '22 18:08 noudess

I'm fine with renaming it to faction associations or something better if anyone can think of something else :P

mackal avatar Aug 02 '22 20:08 mackal

I'm fine with renaming it to faction associations or something better if anyone can think of something else :P

Would strongly prefer to have it prefixed to its function or category per https://docs.eqemu.io/server/database/conventions-guidelines/#table-names

eg. faction_splash_data

We've been slowly trying to move in that direction and every PR is an opportunity to make sure we continue to do that

Akkadius avatar Aug 13 '22 20:08 Akkadius

Closing until comments addressed, Mackal mentioned making a new PR anyhow

Akkadius avatar Aug 31 '22 04:08 Akkadius