lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > LotRO Wish List (L)

Reply
Thread Tools Display Modes
  #1  
Unread 11-13-2007, 11:09 AM
Sorane Sorane is offline
The Undying
 
Join Date: Oct 2007
Posts: 31
Better LFF+Who

Hi!

On my server there is a global ChatChannel GlobalLFF for finding groups.

I think something which could be added to make finding groups easier:

/chatwho GlobalLFF

To find out who is in the channel

/listwho GlobalLFF

List the number of people in the channel

/GlobalLFF

Switch into the channel like you can do with /k instead of having to
/userchat GlobalLFF ...

Small buttons over the chat area with which to directly switch to a certain
channel (user or nonuser), configurable. I could provide a screenshot
of how something like that can look from a different game...

/who Playername

Lists all Players fitting to the parameters into the chat window with their current level, class, race and location. Like this:

/who Guardian+Champion/Riven*+Misty*+Trollsh*/48+/NI+NF

Lists all Guardians and Champions who are in an area who's name either starts with "Riven" or "Misty" or "Trollsh" and who are of Lvl 48+. NI and NF are optional parameters "not in instance" and "Not in fellowship".

They would then be output like this into the chat:

Sorane <Guardian Lvl 50, Human> - Rivendell
Fearim <Guardian Lvl 50, Dwarf> - Trollshaws
Calwen <Champion Lvl 50, Elf> - Misty Mountains

"Subareas" would be recognized by the search for the "greater area". Also you could do an optional parameter GUI which instead of listing in the chat
would invoke the search in the LFF GUI.

Additionally an optional parameter like Kin = ... would limit the search to people of a specific kinship.

For example to find all people from Fellowship of the Song and our partner kinship you would type:

/who */*/*//Kin="Fellowship of*"+Kin = "Custodi*"

As shortcut for the a bit unreadable stuff something like

/who *Kin ="Fellowship of*"+Kin="Custodi*"

might be interesting.

I know, Turbine has lots to do. Well, if they want it, and would guarantee it to be included into the game I actually would implement them the parser
for this powerful who function ;-)

Sorane aka Dipl.Inf. Steffen Haeuser, Game Developer with 5 years experience in computer games development
Reply With Quote
  #2  
Unread 11-23-2007, 09:05 AM
Sorane Sorane is offline
The Undying
 
Join Date: Oct 2007
Posts: 31
Hi!

I did an example implementation of this feature. The source-code would be free for Turbine to have (actually I am posting the core-function at the lower
part of this mail) if they want to use it!!! Of course they would need to make
some small changes to make it work with the source-code of LOTRO (I just made up things like an example-player-class to illustrate how a /who function could get implemented). I believe it would not be much work on their half needed to integrate it into the game.

Note that I also still have C++ implementations of a Damagemeter and of
a XML Character writer which I would give to Turbine if they would want them!

And yes, I know this is a bit weird, posting Source-Code to Turbine ;-) But as long-time-game-developer and long-time-addon-coder I just *had*
to do it ;-)))

I am assuming for my source-code-example:

- There is a global list of online players somewhere (I used a STL-Map in my example)
- There are functions to get a conditioned list (like: "Give me all players between lvl 47 and Lvl 50 in Rivendell")

My example works like this:

/who P=Misty*+Trollsh*+Bree C=Guardian+Hunter+Minstrel L=45-50 K=Fellowship_of_the_Song+The_Shadows F=NI+NF MAX=3

This chat line would output up to 3 people who match the conditions:
- Are in an area who's name Starts with "Misty" or will "Trollsh* or are in Bree
- Are Guardians, Hunters or Minstrels
- Are of Lvl 45-50
- Are either in the Kinship Fellowship of the Song (Blanks need to be entered
as _ in my who function) or in the Kinship The Shadows
- Are not in an instance and not in a fellowship

You can of course skip parameters (including the MAX parameter).

Core-Source-Code of my example is below (A complete Project, compilable with VC++ is available at http://www.file-upload.net/download-...mple.zip.html).

It would be great if Turbine would take up my idea and implement my example into a new feature for LOTRO I think !!! (And yes, I would love an addon-interface for LOTRO ;-) I loved coding addons for that other game hehe).

And this is how the Chat Output of my function could look:

Eldamo <Hunter Lvl 50,Elf> - Trollshaws
Ryalin <Minstrel Lvl 50,Dwarf> - Trollshaws
Sorane <Guardian Lvl 50,Human> - Misty Mountains
---------------------------------

Found: 3 Players.



Sorane


#include <iostream>
#include <sstream>
#include <string>
#include <map>
#include <vector>
using namespace std;
using std::string;

#include "player.h"
#include "utils.h"
#include "finders.h"

/*
who - The main code of the /who functionality
p - The global player list
line - The string of the /who command

max - will return the max number of characters to output
result - the list of players (could be more than max !!!) matching the conditions
*/
map<string,Player*> who(map<string,Player*> p,string line, int& max)
{
string str; // Helper String
map<string,Player*> selection; // Selection of Players found which match the parameters

// Get the part right of "/who ")

string command(line.begin() + line.find_first_of(" "), line.end());

command = command.substr(1,command.length()-1);

selection = p;

// or are there several like "/who Guardian+Minstrel P=Misty*+Trolls* L=45-50 G=Fellowship_of* F=NF

// Does the player look for people in a certain position (like: /who P=Misty*+Trollshaws)

if (command.find("P=")!=string::npos)
{
// Extract the positions the player looks for people in

str = string(command.begin()+command.find("P="), command.end());
if (str.find_first_of(" ")!=string::npos) str = string(str.begin()+command.find("P="),str.begin()+ str.find_first_of(" "));
str = str.substr(2,command.length()-3);

// Select the Players from "selection" which match the condition
// "Is currently at one of the positions matching "str"

selection = FindPlayersAtPositions(selection, str);
}
if (command.find("L=")!=string::npos)
{
// Extract the the levels we look for

str = string(command.begin()+command.find("L="), command.end());
if (str.find_first_of(" ")!=string::npos) str = string(str.begin()+str.find("L="),str.begin()+str. find_first_of(" "));
str = str.substr(2,command.length()-3);

selection = FindPlayersWithLevels(selection, str);
}
if (command.find("K=") !=string::npos)
{
// Extract the Kinship names we look for

str = string(command.begin()+command.find("K="), command.end());
if (str.find_first_of(" ")!=string::npos) str = string(str.begin()+str.find("K="),str.begin()+str. find_first_of(" "));
str = str.substr(2,command.length()-3);

selection = FindPlayersInKinship(selection, str);
}
if (command.find("F=") !=string::npos)
{
// Extract the Kinship names we look for

str = string(command.begin()+command.find("F="), command.end());
if (str.find_first_of(" ")!=string::npos) str = string(str.begin()+str.find("F="),str.begin()+str. find_first_of(" "));
str = str.substr(2,command.length()-3);

selection = FindPlayersWithFlags(selection, str);
}
if (command.find("C=") !=string::npos)
{
// Extract the Kinship names we look for

str = string(command.begin()+command.find("C="), command.end());
if (str.find_first_of(" ")!=string::npos) str = string(str.begin()+str.find("C="),str.begin()+str. find_first_of(" "));
str = str.substr(2,command.length()-3);

selection = FindPlayersWithClass(selection, str);
}
if (command.find("MAX=") !=string::npos)
{
// Extract the Kinship names we look for

str = string(command.begin()+command.find("MAX="), command.end());
if (str.find_first_of(" ")!=string::npos) str = string(str.begin()+str.find("MAX="),str.begin()+st r.find_first_of(" "));
str = str.substr(4,command.length()-5);

max = atoi(str.c_str());
}

return selection;
}


/*
output_who_to_chat - Outputs the result of the who command

max - Max Number of characters to output
p - The selection list to output
*/
void output_who_to_chat(int max,map<string,Player*> p)
{
map<string,Player*>::iterator it;
char temp[255];
int size;
int i;

size = p.size();
i = 0;

for(it = p.begin();it!=p.end();it++)
{
if (i>=max) break;
ChatOutput("\n");
ChatOutput(it->second->name);
ChatOutput(" <");
ChatOutput(ClassConvert(it->second->classtype));
ChatOutput(" Lvl ");
sprintf(temp,"%d",it->second->level);
ChatOutput(temp);
ChatOutput(",");
ChatOutput(RaceConvert(it->second->racetype));
ChatOutput("> - ");
ChatOutput(it->second->position);
i++;
}
ChatOutput("\n---------------------------------\n\n");
ChatOutput("Found: ");
sprintf(temp,"%d",size);
ChatOutput(temp);
ChatOutput(" Players.\n\n");
}
Reply With Quote
  #3  
Unread 11-23-2007, 09:52 PM
wad wad is offline
The Undefeated
 
Join Date: Nov 2007
Posts: 5
Quote:
Originally Posted by Sorane
Of course they would need to make some small changes to make it work with the source-code of LOTRO
Turbine uses a scripts for /who, not a C++ ;)
this script function have name LFGSystem::DoWhoCommand
Reply With Quote
  #4  
Unread 11-25-2007, 09:07 AM
Sorane Sorane is offline
The Undying
 
Join Date: Oct 2007
Posts: 31
Quote:
Originally Posted by wad
Turbine uses a scripts for /who, not a C++
this script function have name LFGSystem:oWhoCommand
Ah ok, this I could of course not know Though I guess in a script something similar could be implemented (don't know of course how powerful the script language is). Out of interest, what scripting language do they use? Lua? or something "Custom"?

Sorane
Reply With Quote
  #5  
Unread 11-25-2007, 02:11 PM
wad wad is offline
The Undefeated
 
Join Date: Nov 2007
Posts: 5
Quote:
Originally Posted by Sorane
Ah ok, this I could of course not know Though I guess in a script something similar could be implemented (don't know of course how powerful the script language is). Out of interest, what scripting language do they use? Lua? or something "Custom"?

Sorane
enough powerful. something custom and unique, similar to python.
really i never saw sources of these scripts, only compiled p-code in the client.
as you may be know - decompiling is against EULA of the game and illegal.
Reply With Quote
  #6  
Unread 11-26-2007, 04:43 AM
Sorane Sorane is offline
The Undying
 
Join Date: Oct 2007
Posts: 31
Quote:
Originally Posted by wad
enough powerful. something custom and unique, similar to python.
really i never saw sources of these scripts, only compiled p-code in the client.
as you may be know - decompiling is against EULA of the game and illegal.

I did not do any decompiling. Well, actually decompiling is not only against the EULA (note that in some countries EULA-regulations are a bit under dispute), but in at least my own country it is also against the law to decompile a program and "use" the knowledge found there, and could bring you into serious trouble if you tried to do it. So decompiling is definitely no option.

Though I would have hoped it would have NOT been a custom script language (personally I think with available powerful open source script languages it does not make too much sense to develop an "own" script language, but seems Turbine is of different opinion) so that if someone develops something he might be able to send the code to Turbine (as no addon-interface, this would have been the only way to get user-developed functionality into the game ;-) ).

Actually, when they HAVE a script language, maybe there IS some hope for an Addon-Interface at some point, though? Of course that would require them to add possibility for "external" scripts, not compiled into the client (From where do you know these things, BTW? Are you a Dev?)

Sorane
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:48 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui