cq_action (in c#)

07/19/2013 02:17 LordGragen.#1
i have 1 question i would like to get answer for it and that's using cq_action is c# source, now

my question is, is it better using this
[Only registered and activated users can see links. Click Here To Register...] that controls the drops and npcs also or use simple table, i never used cq_action but today when i come back from work i am going to explore it, but is it okay 2 let 1 table control all drops and npc?

i know binary use it but idk if its still iligal to use this kind of database in c# sources
07/19/2013 04:45 pro4never#2
There's nothing wrong with using tq's action system or something similar. It's actually quite powerful (as proven by some binary servers such as love 2 hate) but it all boils down to how accurately you re-create the system and how you want it to function.

As much as I'm not a fan of a lot of tq's coding practices and work, they definitely have some very good database interaction as far as customization is concerned.


There's a few sources out there publicly that use tq's action system (or a partial implementation of it) and that would be a good place for you to start if you want to take that route.
07/19/2013 05:19 LordGragen.#3
okay thank you.
07/19/2013 05:56 go for it#4
well away from efficiency i think it's pretty cool to have everything handled at the database (item usage, npc dialog, drops and others), you will end up with a clean code and easier way to implement/update anything
and it should be fine as you are not using tq binaries, nothing illegal so far
but yeah i would like also to ask how would that affect the efficiency
07/19/2013 06:18 iPwnYa"#5
Quote:
Originally Posted by pro4never View Post
There's nothing wrong with using tq's action system or something similar. It's actually quite powerful (as proven by some binary servers such as love 2 hate) but it all boils down to how accurately you re-create the system and how you want it to function.

As much as I'm not a fan of a lot of tq's coding practices and work, they definitely have some very good database interaction as far as customization is concerned.


There's a few sources out there publicly that use tq's action system (or a partial implementation of it) and that would be a good place for you to start if you want to take that route.
can u name a source that use this tq's action system ?! or the link will be much better :)
07/19/2013 06:22 pro4never#6
Quote:
Originally Posted by iPwnYa" View Post
can u name a source that use this tq's action system ?! or the link will be much better :)
All the references I have are not public.

I know elite coemu at one point implemented tq npcs as well as a few others that had partial implementations. Never dug into them very deep though.
07/19/2013 08:37 Korvacs#7
Quote:
Originally Posted by go for it View Post
how have you managed to post 245 times same rate without getting banned ?
How were you stupid enough to quote it?

Quote:
Originally Posted by go for it View Post
well away from efficiency i think it's pretty cool to have everything handled at the database (item usage, npc dialog, drops and others), you will end up with a clean code and easier way to implement/update anything
and it should be fine as you are not using tq binaries, nothing illegal so far
but yeah i would like also to ask how would that affect the efficiency
Also, having a fairly complete implementation for the actions and tasks system I can assure you, you don't always end up with clean code. Its currently over 4300 lines of code and rising, there are 199 action types that I am aware of and for the npc dialog system to work as intended you need the vast majority of them working otherwise you might as well not bother at all.

Oh and @OP heres two videos that show you how I got started with the action and task systems:

07/19/2013 08:59 go for it#8
@Korvacs i think it won't really make difference quote it or not as he had been spamming it since 2011 with +300 posts :)
and still that didn't answer my question about efficiency but i got your point about handling all the action types but i rather have that than having maybe 15k line of codes of npc dialogs where i've to get through while implementing a new npc
while yes it may not be as clean as i think it should be (i would go with this as i did not even give it a try yet) but it will always be far more organized and more reliable and easier to use on the long term
anyway thanks for the videos
07/19/2013 15:44 CptSky#9
Quote:
Originally Posted by pro4never View Post
There's nothing wrong with using tq's action system or something similar. It's actually quite powerful (as proven by some binary servers such as love 2 hate) but it all boils down to how accurately you re-create the system and how you want it to function. [...]
I'm not convinced by the TQ's way... Yes, it's powerful. But it's barely "exposing" methods and fields to the database. You can do the same for a scripting language, and you'll have more control on things. I'm using Lua in my C++ source and I'm just exposing almost every variable of the player in Lua, so I can do whatever I want with them.

It's powerful, but I think it's a bit messy to have 10k of rows with fallback to other rows and have an handler with 10k lines to handle all the conditions/variables/methods/etc.

My opinion :)
07/19/2013 17:20 pro4never#10
Quote:
Originally Posted by CptSky View Post
I'm not convinced by the TQ's way... Yes, it's powerful. But it's barely "exposing" methods and fields to the database. You can do the same for a scripting language, and you'll have more control on things. I'm using Lua in my C++ source and I'm just exposing almost every variable of the player in Lua, so I can do whatever I want with them.

It's powerful, but I think it's a bit messy to have 10k of rows with fallback to other rows and have an handler with 10k lines to handle all the conditions/variables/methods/etc.

My opinion :)
I agree. I have no intentions of using their action system for similar reasons (scripting systems look cleaner, just as powerful and are easier to write and test in my opinion) but it's hard to argue all that hard against tq binaries implementation when they obviously do quite a good job of letting the end user configure quite literally anything they want both in skills and actions.

Not a fan but I can give them at least some credit ;)
07/19/2013 18:42 Spirited#11
I will also have to agree that although the methods used by TQ Digital Entertainment to increase the modularity of the server has been confirmed as powerful, I am not convinced that it's the best way to expand the server. I also have faith in scripting systems. On my blog, you'll notice that I've added a tutorial on setting up Lua in Eclipse for C++. I currently use Python for my server project, and there are many other options out there. Looking at their database, can you understand what one action does? Now take a look at one of my npc actions (a python script).
Code:
# Declare Variables:
avatar = 1;

# Dialog Script:
def npc(client, option):
	if (option == 0):
		Text("Welcome to Twin City's furniture store! I sell a wide variety of affordable, "
		+ "handcrafted interior goods. Would you like to browse my "
		+ "current collection? (This dialog has been edited for this example)");
		Option("Sure!", 1);
		Option("No, thank you.", 255);
		Finish(avatar);
	elif(option == 1):
		Teleport(1511, 51, 68)
	return 0;
I suppose it's only my opinion, but I feel that scripting is a much more organized approach to expanding a server, while preserving readability. I also have no intentions on using their system, but it is a unique approach that I can respect as a developer.
07/19/2013 18:54 Korvacs#12
The problem with scripting it yourself is that you have to basically rewrite thousands of npc dialogs and, if you go all the way with actions all item drops, guild handling, item handling, mob handling etc.

When you could write an action type handler and use the existing database of actions.
07/19/2013 22:37 pro4never#13
Quote:
Originally Posted by Korvacs View Post
The problem with scripting it yourself is that you have to basically rewrite thousands of npc dialogs and, if you go all the way with actions all item drops, guild handling, item handling, mob handling etc.

When you could write an action type handler and use the existing database of actions.
Most dialogues and actions are something you can outsource to testers on the server and I've yet to see a database worth using that's public. They are all horrendously translated or barely functional.

I'd rather have a few of my testers spend a few weeks writing npcs properly and have things working properly and in legible english.
07/20/2013 02:24 angel12345#14
Quote:
Originally Posted by pro4never View Post
Most dialogues and actions are something you can outsource to testers on the server and I've yet to see a database worth using that's public. They are all horrendously translated or barely functional.

I'd rather have a few of my testers spend a few weeks writing npcs properly and have things working properly and in legible english.
Well that a reason I do my server's from 0 action's (binary) since I hate how tq did most of there npc's translations, aswell as useless action's being run when you can make the whole script smaller. If anyone is needing a clean cq_action with the basic npc's PM me.
07/20/2013 05:02 Spirited#15
Quote:
Originally Posted by angel12345 View Post
Well that a reason I do my server's from 0 action's (binary) since I hate how tq did most of there npc's translations, aswell as useless action's being run when you can make the whole script smaller. If anyone is needing a clean cq_action with the basic npc's PM me.
You can post it here or attach it to your post. Based on prior decisions made by the moderators in ImmuneOne's release (Exodus Binaries), the database files for the TQ Binaries are actually allowed here. What's not allowed are the actual executables (the binaries).

Boris (I hope I remembered your name LordGragen), you might want to check out his source for a small example on using the database. I'm not sure how far he got though. The source is available in the releases section in my popular sources thread. I still think scripting is the better route, though.