Regarding CoP progression

Any discussion not related to the other forum topics
Post Reply
PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Regarding CoP progression

Post by PrBlahBlahtson » Sat Jan 26, 2013 4:42 pm

tl;dr: Read it, or don't whine about the consequences when they come ^^;

So I've discovered a small issue today, and I wanted to explain it here so that users and server admins aren't taken by surprise. It's going to be the source of at least one complaint.

At some point, SE made some changes to how the mission log for CoP was accessed. I'm not sure when that happened, and the date isn't too terribly important for our purposes.

Someone did come along and fix things eventually so that we could access CoP mission status again, and pretty much everyone assumed it was fixed, and there'd be no issues. As you've probably guessed by now, there are going to be some issues.

The way we handle mission and quest progression is with two numbers. The first number was the category/region, and the second number was the mission. For example, Rise of the Zilart is 3, and Ark Angels is 26. So player:completeMission(3,26) would complete the Zilart mission "Ark Angels." The numbers that we use are the ones that the client expects to receive, so it made it really easy to give the client the answer it expected.

To save time, we have a file that stores some names, instead. That way, we can use completeMission(ZILART,ARK_ANGELS) and don't have to remember the numbers. Even better, if the numbers change, we just have to update the list, and not every reference to that mission.

Well, when SE changed how CoP was handled, nobody bothered to check if those numbers were still right. And then when people started scripting those missions, there was still nobody checking those numbers. We assumed it had already been done, and the numbers were good. You've probably guessed by now that those numbers are wrong. That's why some of you have progressed in CoP, and you're still seeing "An Invitation West" as your current mission.

Not fixing this isn't an option. Our goal is an accurate server, and if we don't fix it, your CoP mission log will eventually list "For Whom the Verse is Sung" as your current mission when you've finished the entire story. That's not accurate, and that's not happening.

So why is this a problem? Well, the missions were stored as being completed in the wrong values. As things are now, when you finish "The Enduring Tumult of War" (leading up to Promyvion - Vahzl), it stores mission 30 as being complete. However, the client thinks that mission 30 is "Comedy of Errors Act I" (First part of the Windurst leg of The Road Forks.) And once the mission list is fixed, then the server is going to think the same thing. In plain English, that means you're going to lose mission progression when this is fixed.

The problem can possibly be fixed by an enterprising admin, if they check progression when a player logs in, change it to the right value, and then set a char_var to indicate that person has been fixed, and shouldn't be re-fixed. I imagine it could also be fixed with extremely imaginative SQL queries. If any server admins want to do that, they're more than welcome to. Our current plans do not include implementing such a fix. It would be messy, and it would take away time from the projects that the team is currently working on.

Below is the corrected mission list, for any server admins that would like to implement this early, or that want a head start on setting up a fix. We'll very clearly mark the commit message when the update is sent to the trunk. Commented missions do not seem to have a value right now, and the server will not contemplate any value higher than 63 in its current state. I haven't really had time to research the missions and determine if the missing values will be a problem or not. Please also be aware that using the list in its current form could cause crashes. I've contacted the person that has been scripting the missions so that we can make the transition as crash-free as possible.

Code: Select all

-----------------------------------
--  Promathia Missions (6)
-----------------------------------

ANCIENT_FLAMES_BECKON			= 0  -- ± --
THE_RITES_OF_LIFE               = 1  -- ± --
BELOW_THE_ARKS                  = 2  -- ± --
THE_MOTHERCRYSTALS	        	= 3  -- ± --
-- THE_ISLE_OF_FORGOTTEN_SAINTS	=   -- ± --
AN_INVITATION_WEST	       	 	= 5  -- ± --
THE_LOST_CITY	                = 15  -- ± --
DISTANT_BELIEFS	                = 16  -- ± --
AN_ETERNAL_MELODY	        	= 17  -- ± --
ANCIENT_VOWS	                = 18  -- ± --
A_TRANSIENT_DREAM               = 19 -- ± --
THE_CALL_OF_THE_WYRMKING        = 20 -- ± --
A_VESSEL_WITHOUT_A_CAPTAIN      = 27 -- ± --
THE_ROAD_FORKS                  = 28 -- ± --
-- EMERALD_WATERS                  =  -- ± --
-- VICISSITUDES	                =  -- ± --
DESCENDANTS_OF_A_LINE_LOST      = 29 -- ± --
-- LOUVERANCE                      =  -- ± --
-- MEMORIES_OF_A_MAIDEN            =  -- ± --
COMEDY_OF_ERRORS_ACT_I          = 30 -- ± --
-- COMEDY_OF_ERRORS_ACT_II         =  -- ± --
-- EXIT_STAGE_LEFT                 =  -- ± --
TENDING_AGED_WOUNDS             = 31 -- ± --
DARKNESS_NAMED                  = 32 -- ± --
-- THE_CRADLES_OF_CHILDREN_LOST    =  -- ± --
SHELTERING_DOUBT                = 33 -- ± --
THE_SAVAGE                      = 40 -- ± --
THE_SECRETS_OF_WORSHIP          = 41 -- ± --
SLANDEROUS_UTTERINGS            = 42 -- ± --
-- THE_RETURN_HOME                 =  -- ± --
THE_ENDURING_TUMULT_OF_WAR      = 43 -- ± --
DESIRES_OF_EMPTINESS            = 52
THREE_PATHS                     = 54
-- PAST_SINS                       = 
-- SOUTHERN_LEGEND                 = 
PARTNERS_WITHOUT_FAME           = 55
-- A_CENTURY_OF_HARDSHIP           = 
-- DEPARTURES                      = 
-- THE_PURSUIT_OF_PARADISE         = 
SPIRAL                          = 56
-- BRANDED                         = 
-- PRIDE_AND_HONOR                 = 
-- AND_THE_COMPASS_GUIDES          = 
WHERE_MESSENGERS_GATHER         = 57
-- ENTANGLEMENT                    = 
-- HEAD_WIND                       = 
FLAMES_FOR_THE_DEAD             = 58
-- ECHOES_OF_TIME                  = 
FOR_WHOM_THE_VERSE_IS_SUNG      = 60
-- A_PLACE_TO_RETURN               = 
-- MORE_QUESTIONS_THAN_ANSWERS     = 
-- ONE_TO_BE_FEARED                = 
-- IN_THE_LIGHT_OF_THE_CRYSTAL     = 
-- CHAINS_AND_BONDS                = 
-- FLAMES_IN_THE_DARKNESS          = 
-- FIRE_IN_THE_EYES_OF_MEN         = 
-- CALM_BEFORE_THE_STORM           = 
-- THE_WARRIOR_S_PATH              = 
-- EMPTINESS_BLEEDS                = 
-- GARDEN_OF_ANTIQUITY             = 
-- A_FATE_DECIDED                  = 
-- WHEN_ANGELS_FALL                = 
-- DAWN                            = 
-- THE_LAST_VERSE                  = 

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

Re: Regarding CoP progression

Post by PrBlahBlahtson » Tue Jan 29, 2013 7:02 pm

Just a quick heads up, my current plans are to push this out some time tomorrow evening. I haven't put much additional research into it, and progression tracks fine in the "unused" values if you use them for that. I can't guarantee CoP will work when I'm done, but I will make certain it doesn't crash servers.

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

Re: Regarding CoP progression

Post by PrBlahBlahtson » Wed Jan 30, 2013 8:19 pm

Pleasantly, all missions were preserved, or slightly modified. You'll still be able to go all the way up to Promy Vahzl. Progression will still be modified, so people are going to find themselves further back in the missions than they expected. Check your mission list to find out where you've landed; it's semi-accurate now.

For players:
You'll probably find yourself back 3-5 steps in CoP. Sorry, this was unavoidable.

For admins:
I realized there's the slight chance that players can fall through the cracks and be unable to do anything in CoP. I picked up a trio of GM commands for manipulating mission progression, which I'll include in the revision. These commands used to crash the server very easily, but I think I've made them foolproof. They'll still give a message in your log if they're used without a name, but so did @homepoint. They are:
@addmission
@completemission
@delmission

The syntax for these is @addmission missionID logID (optional: player name)
missionID = category. CoP is 6, for example.
logID = mission. See /global/missions.lua for a list of what's what. Use the number, not the words.
The optional name will allow you to change another player's progression. If the name is left out, it will change YOUR progression.

It is highly recommended that you make sure you know what you're doing before you change someone's progression. This means checking the script to see what vars need to be changed (@setplayervar) and what missions need to be changed (@addmission and @completemission).

CoP is odd, in that leaving things with just @completemission will make the log read "Ancient Flame Beckons" and nothing else. If there's a cosmetic issue, @addmission to their latest mission will make it go away.

I should be committing the changes within an hour or two.

2Spooky4u
Posts: 4
Joined: Mon Aug 13, 2012 5:29 pm

Re: Regarding CoP progression

Post by 2Spooky4u » Thu Jan 31, 2013 8:13 am

tl;dr of the tl;dr:

CoP is fixed, quit yer bitchin' and do a few missions again ya ninnies.

THANK YOU BASED BLAHTSON, ALL I CARE ABOUT IS WE'RE ONE STEP CLOSER TO RAJAS HELL YES
If you see me on send me a /t for a pearl
Or don't
I-it's n-not like I c-care!

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Regarding CoP progression

Post by kjLotus » Thu Jan 31, 2013 12:34 pm

2Spooky4u wrote:ALL I CARE ABOUT IS WE'RE ONE STEP CLOSER TO RAJAS HELL YES
guess i better think about making rajas work, then

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

Re: Regarding CoP progression

Post by PrBlahBlahtson » Thu Jan 31, 2013 3:24 pm

Guess somebody needs to figure out how to handle logIDs greater than 64, and a way to update the current database to store that data.

/me looks up at mission list with numbers


Edit:
Since someone has asked, here's how to nuke CoP progression on your server via LUA. It's pretty hack-y (crappy) and will run on players when they log in, so if someone is absent for a long time and comes back after you remove the CoP reset, they won't be reset. Place it inside of "onGameIn" in the /global/players.lua file.

Code: Select all

	if (player:getVar("CoPReset") == 0) then
		i = 1;
		while i <= 32 do
			player:delMission(6,i);
			i = i + 1;
		end
		player:setVar("PromathiaStatus",0);
		player:setVar("EMERALD_WATERS_Status",0);
		player:setVar("MEMORIES_OF_A_MAIDEN_Status",0);
		player:setVar("CoPReset",1);
		player:addMission(6,1);
	end
Untested code, but should work. Note that it's going to produce red message spam in your log every time a player logs in that hasn't gotten all the way up to Promy - Vahzl. But your players will be reset to 0. There's a couple of optional dialogs that I didn't track down the VARs for.

Also note that you should only set that up during down time, so that no one is on the server and making progress that they're going to lose.
Last edited by PrBlahBlahtson on Tue Feb 12, 2013 8:36 pm, edited 2 times in total.

2Spooky4u
Posts: 4
Joined: Mon Aug 13, 2012 5:29 pm

Re: Regarding CoP progression

Post by 2Spooky4u » Thu Jan 31, 2013 3:28 pm

Hit it with a hammer. That might work.
If you see me on send me a /t for a pearl
Or don't
I-it's n-not like I c-care!

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

Re: Regarding CoP progression

Post by PrBlahBlahtson » Tue Feb 12, 2013 8:34 pm

A change by Ezekyel made me spot MAX_MISSIONID. Here's the missing values, which I'll also commit to the trunk once I have something worth committing.

Code: Select all

A_PLACE_TO_RETURN               = 65 -- It's necessary to increase MAX_MISSIONID in charentity.h to reach values > 63
MORE_QUESTIONS_THAN_ANSWERS     = 66
ONE_TO_BE_FEARED                = 67
-- IN_THE_LIGHT_OF_THE_CRYSTAL     = -- Category
CHAINS_AND_BONDS                = 68
FLAMES_IN_THE_DARKNESS          = 77
FIRE_IN_THE_EYES_OF_MEN         = 78
CALM_BEFORE_THE_STORM           = 80
THE_WARRIOR_S_PATH              = 81
EMPTINESS_BLEEDS                = 82 -- Category
GARDEN_OF_ANTIQUITY             = 87
A_FATE_DECIDED                  = 90
WHEN_ANGELS_FALL                = 91
DAWN                            = 92
THE_LAST_VERSE                  = 94
Edit:
Adding that if you change MAX_MISSIONID, for the love of God, change the array size in mmo.h unless you want chaos.

Post Reply