Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2004, 09:15 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default New Perl System -> Requests

Hello,

In light of the newly revamped perl system I am putting together, I would like to ask the people who actually write quests what kinds of functions they think are missing from the current perl implementation.

The new perl stuff I am doing will preserve old behaviors, but greatly enhance the system as a whole. One of the biggest things that I am introducing is the ability to return values from quest functions. The first thing I have implemented with this, as an example of what can be done, is this:
quest::ChooseRandom(1001, 1002, 1003, ...)

which will pick one thing out of the list of things supplied to it, and return that value., for an example use:
quest::summonitem(quest::ChooseRandom(1001, 1002, 1003));
would give you a random cloth thing..

I plan to add entire objects for the NPC and Client involved soon, so you can do almost anything in perl that you can do in C++ right now, like $client->GetLevelCon($npc->GetLevel());

im not looking for big dynamics changes, just little functions that would be useful.

anyways, ideas?
Reply With Quote
  #2  
Old 10-29-2004, 10:22 AM
Malignus Wingnut
Hill Giant
 
Join Date: Sep 2004
Posts: 233
Default

-Disregard-
Reply With Quote
  #3  
Old 10-29-2004, 11:21 AM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

FNW,

i think there's some work to do on making available internal PC structs data to perl context (like $currenthp, $currentmana, $whatever).

Also, allowing to update (change) these values from perl should be nice. i guess simple perl wrapper for C functions that already exist would be nice.

On the other hand .. please do not try to rewrite perl language or libraries. Quest ::ChooseRandom(1001,1002,1003) has no reason to be anything else than a perl plugin imho.
__________________
EQEMu Quest Repository is down until something new :(
Reply With Quote
  #4  
Old 10-29-2004, 11:41 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Quote:
i think there's some work to do on making available internal PC structs data to perl context (like $currenthp, $currentmana, $whatever).
this is already possible in the new system from what i understand. i beleive it's one of the main reasons for the revamp
Reply With Quote
  #5  
Old 10-29-2004, 11:43 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

I have a question about the new revamp itself. Will old commands be backward compatible or will the syntax have to be reformatted?
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #6  
Old 10-29-2004, 12:05 PM
Scorpious2k's Avatar
Scorpious2k
Demi-God
 
Join Date: Mar 2003
Location: USA
Posts: 1,067
Default

Should we be adding things that are already possible with perl?
__________________
Maybe I should try making one of these servers...
Reply With Quote
  #7  
Old 10-29-2004, 12:58 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

Quote:
Originally Posted by Scorpious2k
Should we be adding things that are already possible with perl?
possible, yes... simple for non-perl people... no. iv seen numerous posts about it, and been asked on irc countless times how to do it... if it were inherintly easy, people wouldent need to ask about it.

on the same token, sure it could be put into a plugin, but
1. I have yet to see people release any standard useful plugins
2. why require a plugin for something that is such a frequent operation
3. It makes the quests that use it (many, many quests) standardized, so they work anywhere without having to track down the right plugin.
Reply With Quote
  #8  
Old 10-29-2004, 11:04 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

Perl is a language .. nothing more, nothing less.

You can substitute perl for a new language, still people have to learn it and how to use it. I believe it is what pple have trouble with :/
At least, perl is bug free, there are zillions tutorials, and it's very easily extensible, and ...

As for releasing plugins / recipes / snippets, here's the code for quest::RandomChoice(a,b,c) :

Code:
sub RandomChoice{
  @values=shift;
  $choice=$values[int(rand(length @values))];
  return $choice;
}
or, inlined :
Code:
$values=(1001,1002,1003);
...
$choice=$values[int(rand(3))];
Was it worth a post ?

Getting such a EQEMu 'library' can be usefull, if people what plugins then they have to work for it.

Now, if you want to build wizards that generate quests out of couple clicks, it might very much help some people. Just like Visual studio helps writting C or C++ :(. It does not define a new language (or if it does, you wouldn't say it's better, would you ?)
__________________
EQEMu Quest Repository is down until something new :(
Reply With Quote
  #9  
Old 10-30-2004, 04:19 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

An EVENT_TIMEOFDAY would be useful. Some NPC scripts start when a certain in-game hour of the day hits.
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #10  
Old 10-30-2004, 11:31 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Smogo, a lot of us dont know perl like the back of our hands like you apparently do, don't put this down just because you are above it. We need this. It will be very helpful and increase the quest creation overall, something we sorely need.
Reply With Quote
  #11  
Old 10-30-2004, 01:06 PM
Cutter
Sarnak
 
Join Date: Sep 2004
Posts: 85
Default

i would love to see somehow a way to tag players...

let me explain..

im not really good at perl so pls bare with me..

tag.posion=1
if (&lt;playera.tag.poison>>=1)
then whatever


im not sure if this is possible. but heres why i would love this..

it could set variables to players.. in certain situations.. still im so new to perl and maybe this is already possible... but i think this would be good..

also is there a way to call an enviroment change

meaning if player a was in zone..
and it starts raining
then a sub event would happen but only when it rains..

hmm why? well then you could say.. player is freezing to death..
player is soak and wet..

i know it sounds kinda stupid.. but hey.. the more flexiability i can get .. the better the coding could be
Reply With Quote
  #12  
Old 10-30-2004, 06:01 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

You can flag players with the qglobals system that scorp2k added a while back.
Reply With Quote
  #13  
Old 10-30-2004, 08:08 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

FYI, i didn't know much of perl before i registered these boards. Then i used google and read a few books to learn it.

i believe the actual system can be improved. But just to be clear : you could make it C++ like, or VB like ... it wouldn't make the creation of quests instant. XS was a big improvement tool to the perl quest system. It's been underused. Still people need to program ... that's the problem imo.

i won't judge before i know what FNW want's to do, this was just a contribution, not trying to show i'm 'above' anything.
__________________
EQEMu Quest Repository is down until something new :(
Reply With Quote
  #14  
Old 10-31-2004, 05:03 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

Quote:
Originally Posted by smogo
XS was a big improvement tool to the perl quest system. It's been underused.
I was kind of curious about this. By new system is it meant that much of the code is going over to XS?

And I'd have to agree with adding simplified methods/wrappers for accomplishing things that are already possible in perl. This not only makes it easier for those newer to perl to get things done, but quicker/cleaner for everyone else. This is why libraries are a good thing.
Reply With Quote
  #15  
Old 10-31-2004, 11:06 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

Quote:
Originally Posted by m0oni9
By new system is it meant that much of the code is going over to XS?
yes, everything is moving to XS, command queue is going away completely. This is in fact due to you making me aware of the command queue.... which is a total hack. Im keeping the old system around for whatever reason... I even converted the .qst system to use the new methods... no idea why, i doubt it even compiles (:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:42 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3