Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World data and quest action development for mods #1599

Merged
merged 28 commits into from Nov 5, 2019

Conversation

@ajrb
Copy link
Collaborator

ajrb commented Nov 4, 2019

Whew, this is a big one. I apologise in advance for the amount of effort this will take to review and check. It's going to allow some pretty cool stuff from modders though. I've been developing a new quest for the roleplay mod which has multiple paths, new npcs, new location, and dynamically changes the world providing a new service to successful players. These are all the changes I needed in core to make it possible. If anyone wants to test these changes with the new quest, let me know.

So here's a rundown of what's in this PR:

  • Ability to override RMB blocks including ground data.
  • World data variant system allowing dynamic changes to the game world. Variants can also be specific to a location, so just a single building in the whole world can be targetted for the changes.
  • Allow multiple quest markers to be used when placing npcs and foes from quest scripts.
  • Add new quest actions: worldupdate, clickedfoe (credit: DFIronman), enemies, killfoe, paymoney, journalnote.
  • Allow new locations to be targetted as permanent quest sites.
  • Enable adding data to quest tables from mods.
  • Allow new individual npc's to use (almost) all of the faces in the game.
  • Add a player lastname macro.
  • Enable mods to add new merchant services.
  • Various bugfixes.
ajrb added 28 commits Oct 21, 2019
Replaces entire block, no caching for variants
Also, enables multiple quest markers to be used to place resources at the target building interior using marker indexes. The first will become the normal selected marker... e.g. quest objective.
ClickedFoe - from DFIronman
KillFoe - required a death trigger added to foe class
PayMoney - allows paying with LoCs etc
@ajrb

This comment has been minimized.

Copy link
Owner Author

ajrb commented on ba1195b Nov 3, 2019

@Interkarma I want to call out this change to you, out of all the changes I've made this one is the most likely to break classic quests. I do think it's a bug here though and it caused my quest to not detect the player had an item when picking off a corpse as the UID was different. I noticed that toting action checked the item quest class rather than the DaggerfallUnityItem and figured it was probably a mistake here to do so.
This may even fix some broken paths in classic quests, but it's possible this was intentional and the quests require this difference in behaviour. Only you will know that.

This comment has been minimized.

Copy link

Interkarma replied Nov 3, 2019

I agree using Contains(Item questItem) overload is the most robust method to use here. Not sure why I used the Contains(DaggerfallUnityItem item) overload. Most likely an oversight.

I don't believe this will break any other quests and should test fine for all past and future quests. The check is using quest UID and item Symbol which is how it's supposed to work. The instanced DaggerfallUnityItem itself might get moved, destroyed, and recreated throughout the quest, which can lead to the item UID changing. That's why there's a quest-specific overload in the first place.

The only problem I can think of is if the item is made permanent via MakePermanent action. This lowers the IsQuestItem flag so the quest item will no longer test with HaveItem. But I don't think that will affect any classic quests, and MakePermanent should only be run once the quest is finished with the item.

Short version: reasonably confident this will be OK. We just need to test some other quests using HaveItem just to be sure I haven't forgotten something.

This comment has been minimized.

Copy link
Owner Author

ajrb replied Nov 3, 2019

Cool, that's what I thought / hoped, but wanted to call it out and check. Massive PR incoming. (I'm sorry I know you were enjoying a break)

@ajrb ajrb requested a review from Interkarma Nov 4, 2019
@Interkarma

This comment has been minimized.

Copy link
Owner

Interkarma commented Nov 4, 2019

I'd love some help testing this one @TheLacus, @petchema, @numidium, @JayH2971, @Nystul-the-Magician, and any others interested. The more eyes on it before merge, the more likely we are to catch any issues. We have different areas of interest and expertise, and we could all spot something that I might miss.

Thank you @ajrb for the PR and everyone who can help test. :)

@JayH2971

This comment has been minimized.

Copy link
Contributor

JayH2971 commented Nov 4, 2019

Would anyone be able to make a Linux build with this PR included? I can't make builds myself and I think this is important to test. (I'm still not free from stomach flu so this isn't urgent, but I'm happy to get involved when I can.)

@Interkarma

This comment has been minimized.

Copy link
Owner

Interkarma commented Nov 4, 2019

@JayH2971 Can do Jay. I'll PM you a link within next 24 hours. Thank you for help. :)

@TheLacus TheLacus self-requested a review Nov 5, 2019
@Interkarma

This comment has been minimized.

Copy link
Owner

Interkarma commented Nov 5, 2019

I have elevated this PR to a branch of it's own. Merging changes to branch where we can continue work on it.

@Interkarma Interkarma changed the base branch from master to worldDataDev Nov 5, 2019
@Interkarma Interkarma merged commit 9ba1156 into Interkarma:worldDataDev Nov 5, 2019
@Nystul-the-Magician

This comment has been minimized.

Copy link
Contributor

Nystul-the-Magician commented Nov 6, 2019

I plan to take a look as well soon ;)

@JayH2971

This comment has been minimized.

Copy link
Contributor

JayH2971 commented Nov 6, 2019

So far I've done the following quests and picked up/delivered/dropped (where applicable) the quest item, and things have all gone well:
MG Retrieve an Ingredient
MG Mummy Wrappings
MG Research Notes
MG Guard the Guild
TG A Hot Stone
TG Drugs Delivery
TG A Treasured Potion
Merchant The Courier

The Courier was the one that I thought could cause problems since I surrendered the item to the thief and then killed to get it back. But the item ID persisted fine; the turn-in was a success.

@Nystul-the-Magician

This comment has been minimized.

Copy link
Contributor

Nystul-the-Magician commented Nov 9, 2019

I tested a bit - so far things are working

@Interkarma

This comment has been minimized.

Copy link
Owner

Interkarma commented Nov 29, 2019

@ajrb I'm going to merge this and drop builds with this change over weekend. Just letting you know in case there are some last-minute changes you need to make. :)

@ajrb

This comment has been minimized.

Copy link
Collaborator Author

ajrb commented Nov 30, 2019

@Interkarma Great, sooner the better due to my upcoming lack of time. I have some this weekend and maybe a little in the coming week. In case there are issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.