Jump to content
PACI

[Release] Quest Categories

Recommended Posts

Hi there.

While cleaning out "my closet", I found this thing I developed between 2014-2015 - maybe(?) - for my, at that moment, server. Since it's now closed, and I won't use it, I'm sharing it with you guys.

Note: Didn't do the scrollbar, wasn't needed for me, so yeah.

9eedbf683f.jpg

Now, let's start with opening your locale_game.txt and adding these lines:

QUESTCATEGORY_0	Main Quests
QUESTCATEGORY_1	Sub Quests
QUESTCATEGORY_2	Collect Quests
QUESTCATEGORY_3	Levelup Quests
QUESTCATEGORY_4	Scroll Quests
QUESTCATEGORY_5	System Quests

Alright, now find your characterwindow.py (uiscript?) and you can either comment Quest_Page children or simply remove them all.

Moving on to your interfaceModule.py find this line self.BINARY_RecvQuest(index, name, "file", localeInfo.GetLetterImageName()) and replace it with self.wndCharacter.questCategory.RecvQuest(self.BINARY_RecvQuest, index, name)

Ok, then we are at the most, let's say, difficult part of this. Open your uiCharacter.py and just as you did in your characterwindow.py, remove or simply comment any single line related to quests. You can just search for these vars:

	        self.questShowingStartIndex
	        self.questScrollBar
	        self.questSlot
	        self.questNameList
	        self.questLastTimeList
	        self.questLastCountList


Once you did that, you just:

# Find these lines
        self.soloEmotionSlot = self.GetChild("SoloEmotionSlot")
        self.dualEmotionSlot = self.GetChild("DualEmotionSlot")
        self.__SetEmotionSlot()

# And add the following
        import uiQuestCategory
        self.questCategory = uiQuestCategory.QuestCategoryWindow(self.pageDict["QUEST"])

# Find this
    def OnUpdate(self):
        self.__UpdateQuestClock()

# Replace it with
    def OnUpdate(self):
        self.questCategory.OnUpdate()


And we're done with the client-side. I attached some extra elements needed (such as the main python file (uiQuestCategory.py) and some image resources).
Remember to edit the path linked to these images in that file.

For the server-side... Well, screw it, uploaded it too. Too lazy to write.
It has only a new quest function (q.getcurrentquestname()) and a few things to add in your questlib.lua.

Btw, not sure if  you have it, but if not, just add this extra function in ui.Button() (ui.py - class Button).

	def SetTextAlignLeft(self, text, height = 4):

		if not self.ButtonText:
			textLine = TextLine()
			textLine.SetParent(self)
			textLine.SetPosition(27, self.GetHeight()/2)
			textLine.SetVerticalAlignCenter()
			textLine.SetHorizontalAlignLeft()
			textLine.Show()
			self.ButtonText = textLine

		#Äù½ºÆ® ¸®½ºÆ® UI¿¡ ¸ÂÃç À§Ä¡ ÀâÀ½
		self.ButtonText.SetText(text)
		self.ButtonText.SetPosition(27, self.GetHeight()/2)
		self.ButtonText.SetVerticalAlignCenter()
		self.ButtonText.SetHorizontalAlignLeft()

Forgot the source part, fml, here it is. Add it to your questlua_quest.cpp.

	int quest_get_current_quest_name(lua_State* L)
	{
		CQuestManager& q = CQuestManager::instance();
		PC* pPC = q.GetCurrentPC();
	
		lua_pushstring(L, pPC->GetCurrentQuestName().c_str());
		return 1;
	}

	void RegisterQuestFunctionTable()
	{
		luaL_reg quest_functions[] = 
		{
			{ "getcurrentquestname",	quest_get_current_quest_name},
			{ NULL,						NULL						}
		};

		CQuestManager::instance().AddLuaFunctionTable("q", quest_functions);
	}

 

Now, finally, have fun and bye!

questcategory.7z

server-side.7z

  • Love 58

Share this post


Link to post
3 hours ago, AlexKenT said:

Can you leave your uicharacter.py ?

Yeah, pls

Share this post


Link to post

It was already on my server, decided not to publish it since it was mostly extracted from WoM2, but now it's been 3 years so you've made the good choice, you nailed it sir :D

Share this post


Link to post
2 hours ago, AlexKenT said:

 and scroll?

 

On 2/2/2017 at 4:20 AM, PACI said:

Note: Didn't do the scrollbar, wasn't needed for me, so yeah.

 

  • Love 1
  • Haha 1

Share this post


Link to post

I just want to ask if the ticked box remains after you closed the window, like wom2, because this is the only bug I have now and I never fixed it, just to see if you have the same problem that I have since I implemented the system ^^

Share this post


Link to post

It's beautiful!

I have a problem:

 

1)

 

 

Ps: How do I assign a mission its type? (Main quests, sub quests)

Share this post


Link to post

http://grabilla.com/07915-15dd9b38-8dbe-4f37-9474-cceac0b44e9f.html[/img] 

		search : self.__questCategorySlot[i].openImage.Show() y paste 

			self.__questCategorySlot[i].closeImage = ui.Button()
			self.__questCategorySlot[i].closeImage.SetParent(self.__questCategorySlot[i])
			self.__questCategorySlot[i].closeImage.SetUpVisual("Other/questcategory/quest_category_open.tga")
			self.__questCategorySlot[i].closeImage.SetOverVisual("Other/questcategory/quest_category_open.tga")
			self.__questCategorySlot[i].closeImage.SetDownVisual("Other/questcategory/quest_category_close.tga")
			self.__questCategorySlot[i].closeImage.SetPosition(10,5)
			self.__questCategorySlot[i].closeImage.SAFE_SetEvent(self.__CloseCategories, i)

closed y open 

Share this post


Link to post

German:

Hey Community,

habe mal eine Frage bzg. des Systems (Quest Categories).
Screen:
e76f5bc3ee.PNG

Hab bei mir das eingefügt nur weiß ich gar nicht wie man da Queste erstellt bzw.
wie Queste dort auftauchen.

Habe eine Function in der Src eingefügt, un zwar folgende:
------------------------------------
getcurrentquestname
------------------------------------

Habe in der quest_function (Serverside) das eingefügt:
q.getcurrentquestname

Kann mir vllt. einer ein Beispiel machen wie ich es zum laufen bringen kann das meine Queste dort angezeigt werden
bzw. wie man Sie dort einfügen kann.

MFG.

 

English:

 

Hey Community,

have a question. of the system (Quest Categories).
Screen:e76f5bc3ee.PNG

I have inserted this only I do not know how to create Queste or
like quests appear there.

Have a function in the Src inserted, namely the following:
------------------------------------
getcurrentquestname
------------------------------------

I inserted in the quest_function (Serverside):
q.getcurrentquestname

I can probably. Let me give you an example of how I can make my quest appear there
or how you can insert it there.

Best regards

Share this post


Link to post

Hello there.

I have a little problem on client

1213 19:45:05627 :: 
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:25) <module>
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiCharacter.py, line 767)

1213 19:45:05627 :: ============================================================================================================
1213 19:45:05627 :: Abort!!!!

Someone know to help me?

Share this post


Link to post
Acum 4 ore, Antigene a spus:

Easy to Fix @darkess look at youre tabs buddy

I hate python xD

I will look at tabs,thanks

edit: Works perfectly now but i miss something xD

Photo:

1217_160705.jpg

Edited by darkess (see edit history)

Share this post


Link to post

image.png

Is Works, have small bugs but is very good 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.