• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ [3777] Quest Log Storage Issue [Displaying Proper Text Message]

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,731
Solutions
7
Reaction score
537
Location
Canada
Hey there everyone, I am experiencing some issues when it comes to displaying proper text messages in Quest Logs with multiple values.
When the storage reaches the final value, the quest completes properly.
But the quest log is blank for multiple missions when starting "Mission 1 - Check Postal Routes" - when reaching (100171,4) as a storage value; you will start to see text for first mission. So when you complete travel to Edron, player gets quest log updated with "First travel with Captain Bluebear~".

Lua:
<quest name="The Postman Missions" startstorageid="100171" startstoragevalue="1">
    <mission name="Method" storageid="100171" startvalue="1" endvalue="1">
            <missionstate id="1" description="You have joined the Postman guild."/>
    </mission>
    <mission name="Mission 1 - Check Postal Routes" storageid="100171" startvalue="2" endvalue="7">
        <missionstate id="2" description="First travel with Captain Bluebear's ship from Thais to Carlin."/>
        <missionstate id="3" description="Head to Fermor Hills and travel with Uzon to Edron."/>
        <missionstate id="4" description="Travel with Captain Seahorse to the city of Venore."/>
        <missionstate id="5" description="Find the technomancer Brodrosch and travel with him to the Isle of Cormaya."/>
        <missionstate id="6" description="Now report back to Kevin about your mission."/>
        <missionstate id="7" description="You have finished this mission."/>
    </mission>
</quest>

NPC's recognize and update properly; it's only the Quest Log not displaying text correctly for missions oddly..

3777 Source Code: GitHub - Fir3element/3777-bkp at aef29d0ac94140c5d095cb1f55a34035e42746b3 (https://github.com/Fir3element/3777-bkp/tree/aef29d0ac94140c5d095cb1f55a34035e42746b3)
Quests.cpp: 3777-bkp/quests.cpp at aef29d0ac94140c5d095cb1f55a34035e42746b3 · Fir3element/3777-bkp (https://github.com/Fir3element/3777-bkp/blob/aef29d0ac94140c5d095cb1f55a34035e42746b3/src/quests.cpp)

Now, I believe the fix is solved in later revisions like 3884 -> 3996; I could only find 3884 (link below).
3884: GitHub - otland/tfs-old-svn at r3884 (https://github.com/otland/tfs-old-svn/tree/r3884)

I tried copying the Mission:: ParseStorages and Mission::getDescription into 3777 but got compiling errors relating to the lines with player->getStorage(storageId, value); for some reason.

Any help is appreciated, would love to have a working quest log for detailed quests/missions.
 
Last edited:
Solution
Any help is appreciated, would love to have a working quest log for detailed quests/missions.
3777 code generating description of mission:
Code:
for(int32_t i = endValue; i >= startValue; --i)
{
   player->getStorage(storageId, value);
   if(atoi(value.c_str()) != i)
      continue;

   std::string ret = states[i - startValue];
This line:
Code:
<mission name="Mission 1 - Check Postal Routes" storageid="100171" startvalue="2" endvalue="7">
Configures to load state from ID of storageValue - startvalue. For storage value 2 it will load mission state = 0, for 4 it will load 2.

I think your missionstate must have IDs from 0, not 2:
Code:
        <missionstate id="0"...
Any help is appreciated, would love to have a working quest log for detailed quests/missions.
3777 code generating description of mission:
Code:
for(int32_t i = endValue; i >= startValue; --i)
{
   player->getStorage(storageId, value);
   if(atoi(value.c_str()) != i)
      continue;

   std::string ret = states[i - startValue];
This line:
Code:
<mission name="Mission 1 - Check Postal Routes" storageid="100171" startvalue="2" endvalue="7">
Configures to load state from ID of storageValue - startvalue. For storage value 2 it will load mission state = 0, for 4 it will load 2.

I think your missionstate must have IDs from 0, not 2:
Code:
        <missionstate id="0" description="First travel with Captain Bluebear's ship from Thais to Carlin."/>
        <missionstate id="1" description="Head to Fermor Hills and travel with Uzon to Edron."/>
        <missionstate id="2" description="Travel with Captain Seahorse to the city of Venore."/>
        <missionstate id="3" description="Find the technomancer Brodrosch and travel with him to the Isle of Cormaya."/>
        <missionstate id="4" description="Now report back to Kevin about your mission."/>
        <missionstate id="5" description="You have finished this mission."/>
 
Solution
Back
Top