Cavernous Maws

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Cavernous Maws

Post by PrBlahBlahtson » Sun Jul 29, 2012 11:05 pm

Another "it works but" project from me.

The attached patch does the following:
- Adds .LUA scripts for all WotG cavernous maws, based on some old PXI scripts I had around.
- Corrects a few NPC IDs, so that the maws appear in their cutscenes and have the right name.
- Adds character variables for unlocked maws, mirroring retail where you have to run around and activate them. Seems like doing something with binary might be more efficient though, like the way jobs are handled.
- Grants the Pure White Feather key item, and checks it when appropriate.
- Grants access to the Cavernous maw when it's examined the first time, from the past. Retail may require you to actually pass through the maw, but I can't remember for certain and just went with how PXI handled it.

...but, they do not:
- Record WotG mission progression. I didn't want to force anyone to use a mission tracking method they didn't like.
- Have guaranteed accurate positions, and setPos values. PXI had 5 maws scripted, I'm not certain if they're right, and I made up the rest of the setPos values. Some maws were missing from npc_list, so I fudged their location using the corresponding past/present maw.
- Have a message if you lack clearance (but does retail? I forget.)
- Populate the zones. They're pretty much empty, and therefore boring.
- Handle the gates between maws. A lot of them are closed, and can't be circumvented without @wallhack.
- Replace npcs that currently have incorrect IDs. In those zones, the maw will have an incorrect name when targeted, and may be missing during the teleport cutscene. You can resolve these issues manually using POLUtils and a lot of NPC deleting. Issues will tentatively be in Pashhow Marshlands [S], Jugner Forest [S], Sauromugue Champaign [S], Meriphataud Mountains [S], and West Sarutabaruta [S].

This means:
- You may have to re-claim all maws again if someone changes how they're stored in the future.
- You may have some issues if/when WotG is actually scripted, since you have your keyitem, but you don't have the accompanying mission progression. A nice scripter could work around it, but I can't guarantee they will. :)
- Your players may not be able to access all maws due to gates blocking their path.

To add this to your server, update to the latest SVN data. Navigate to c:\dsp, right click, and select "Apply Patch" under TortoiseSVN. Select the patch, and let TortoiseSVN think about it. Click "Patch All Items." Once the patching is complete, you'll have to load npc_list.sql again, and start your game_server after that's been done.

I may make minor changes to this if anyone offers suggestions/bugs, but I've taken it about as far as I intended to. The patch was built from r1578.

If anyone wants to pick this up and provide a fixed version that addresses the flaws I left, then be my guest.

Version history:
v1 - Built from 1564, npc_list.sql actually wouldn't import due to npcid conflicts
v1.1 - Reverted multiple npcids. This means that the maws in some zones will have an incorrect name when targeted, and will not appear in their cutscenes.
Attachments
Cavernous Maws.patch
v1.1, fixes NPC conflicts I had overlooked.
(31.24 KiB) Downloaded 61 times
Last edited by PrBlahBlahtson on Tue Jul 31, 2012 8:49 pm, edited 1 time in total.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Cavernous Maws

Post by bluekirby0 » Mon Jul 30, 2012 2:38 am

Please be aware that this will not be added to the SVN unless the prerequisites and events are handled appropriately.

As for which cavernous maws are unlocked for use in the present, a bitmask is appropriate, but it would be better stored more permanently in one of the char_ tables rather than char_vars which is meant for temporary variables.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Cavernous Maws

Post by PrBlahBlahtson » Mon Jul 30, 2012 3:31 am

Yeah, pretty much knew this wouldn't be put in the trunk. It's kind of hard to set up the maws with restrictions without setting up WotG Mission 1, and I didn't want someone else to have to work around my mess. I also wasn't sure how to set it up for a bitmask, and I knew it was a better solution than 9 variables for every character. I was torn between putting it in Contributions, or Custom Apps.

I figured if someone else wants those zones accessible, this saves them time.

Like if, say, someone was planning to post a diff for Lakeside Minuet, Waltzes, and Jigs in the near future. :lol:

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Cavernous Maws

Post by bluekirby0 » Tue Jul 31, 2012 5:37 am

We aren't stopping you from doing WotG Mission 1 though. If you want to work on WotG then I have no complaints.

The focus of the project is currently on RotZ but that doesn't mean other contributions are ignored :D

Makocreation
Posts: 9
Joined: Sun Jul 22, 2012 6:33 am

Re: Cavernous Maws

Post by Makocreation » Tue Jul 31, 2012 6:44 am

I like this more then my keyboard can express =]. I love storyline ^^.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Cavernous Maws

Post by PrBlahBlahtson » Tue Jul 31, 2012 5:08 pm

bluekirby0 wrote:We aren't stopping you from doing WotG Mission 1 though. If you want to work on WotG then I have no complaints.

The focus of the project is currently on RotZ but that doesn't mean other contributions are ignored :D
I could probably bumble my way along WotG, but it's just dependent on so many things that it's intimidating. All three city stories depend on, and are depended on, by the main story thread at multiple points. You've got some rather unique BCs with around a dozen enemies and a half-dozen allies. And I figured fudging even one NPC's data would raise eyebrows, nevermind large-scale fudging of an entire expansion's population. :)

I know someone had been tinkering with CoP in the old forums, but if they're not heard from I may either poke the remainder of RotZ or start working on converting CoP from the PXI scripts. I'd also like to try experimenting with animations for Jumps/Bashes/DNC/SCH, although I have a sneaking suspicion that won't be productive. Might lead to an ID table of # = AnimationID, though.

But first, I'll have to wrap up the DNC unlock quest and release those, along with Waltz 1-4, Spectral, and Chocobo Jig. Animations aren't right just yet, but I'm pretty sure functionality (other than messages) is fine.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Cavernous Maws

Post by PrBlahBlahtson » Tue Jul 31, 2012 8:33 pm

Hmm, that's interesting. Huge batch of conflicts with Jugner [s], now that I look. Everybody got moved down about 3 values to make room for something or other. That could have some issues with the new Logging system.

Going to look at it a little, and I'll upload a corrected patch once I have it resolved. Worst case scenario, the Jugner [S] maw will have the wrong name. Not going to break trunk code for an unofficial slap on.

Edit:
Yeah, logging system is hardcoded on NPC IDs. If the WotG zones are every re-captured, those'll have to be fixed, as a heads up. They start at 17113896 now. Breaking Jugner's maw.

Oh hell. That's a lot of conflicts in npc_list. Ceding to trunk values where applicable. This will break cutscenes and make names incorrect.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Cavernous Maws

Post by bluekirby0 » Wed Aug 01, 2012 6:47 am

If its a simple shift of 3 IDs then you can modify the svn list to make it match the client list. That kind of change can even be merged with svn.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Cavernous Maws

Post by PrBlahBlahtson » Mon Aug 06, 2012 8:39 pm

So, on a whim (like most of my projects) I decided to start converting this over to the new setMaskBit/getMaskBit system under the variable "wotgMaws." I'm also going to drop all pretense of creating the missing NPCs, because I know that's not kosher. I'm going to look at what it takes to change mission status, and include that in the scripts, just so they're pretty much done from an accuracy point. Essentially, my goal is to make scripts that are kosher for the SVN, even though some of the NPCs don't exist, and players can't access them. That shouldn't take me much work, but I have a few questions to go with it.

Could a mod move this to scripting where it belongs? That'd be great ^^; Sorry about that.

Is there a way for me to read which expansions are enabled on the server from an LUA script, or create and read a .conf variable? NPCs in the WotG zones are an absolute mess. No mobs, gate NPCs have the wrong name/namedisplay status where they aren't missing altogether, and half the maws don't even exist with the SVN's list. It seems like it would be good for everyone if server admins could just turn the maws off from a single point, and keep users out of that mess altogether. Not a deal breaker, though.

That, and DNC is horribly imbalanced at the moment, so it gives admins a way to keep players away from that, too.

Am I wasting my time for now? ^^; I'll probably be done by the time you answer though.

Planned issues once I'm done:
- Missing maws/wrong names. No retail account, not sure I have the right version of the tool. Adjusting NPC IDs is basically rediscovering the wheel, since you'll overlap every NPC anyway.
- Maws don't appear in their cutscenes/wrong names. That'd be because the NPC IDs are wrong.
- Unverified/guessed landing coordinates. Can't check retail, so I tried to fudge it. I also trusted that the PXI values were correct, where available, so they're not verified. Someone in retail could use the Infobar plugin with Windower to get accurate landing data, and I can use that if it's available. This seems like the biggest issue blocking from the trunk.
- Still not sure if setMaskBit is executed at the right time. I believe you have to actually pass through the maw to unlock it, which would be onEventFinish. Right now, you get credit by examining, whether you say yes or no. This coincides with PXI.

Edit:
Fun example of why this should be kept away from player servers. Went to Sauromugue, examined the Cavernous Maw. Why Sauromugue? Well, there's no maw in Rolanberry or Batallia on the [S] side. No feather, so I get the Mission 1 CS. Three NPCs missing (17269233, 17269234, and 17269238, all of which have no name in POLUtils.) The initial cutscene where the maw eats you is all messed up, with the camera angle going wild or pointing at the blank sky. This may be because Sauromugue has two maw NPCs (for some reason it's unique), and I highly suspect we've used the wrong ID, easy to fix though. Second half of the cutscene goes fine. I get spit out in Rolanberry Fields by the random number generator, and mission status is properly updated. However, there is no cavernous maw. In fact, there's no NPCs at all, so I'm completely trapped without any helpful mobs to kill me.

The scripts are (mostly) good, but they'd be hell with users around. :)

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Cavernous Maws

Post by bluekirby0 » Mon Aug 06, 2012 11:03 pm

As long as your scripts look solid, I have no issue with committing them (even if they don't 'work' due to no fault of your own). As for use of the setMaskBit() et. al. functions, while I am happy to see them being used, they are meant to store things in temporary variables (in char_vars) used by quests and such that can be removed upon completion of the quest...and less for storing permanent data like unlocked maws.

If you are serious about doing this I can make you another set of functions to work with cavernous maws and set up new rows in a more appropriate database table. It would also be good to get someone with retail who can manage a more recent zonecap of the affected areas for both NPCs and mobs. We will need to come up with a new method for zonecapping, since the original method used on pXI has been disabled. I have some ideas from talking to one of the previous developers, but I will need some time to make it into a practical solution.

Post Reply