Age | Commit message (Collapse) | Author | Files | Lines |
|
This removes support for skills. The plan is to allow to implement the skills
as they were implemented before via attributes. This adds a lot more
flexibility to the server creators while also removing the confusion about
skills and attributes.
So this change does:
- Remove the skillmanager with all its calls, the skill xml file, etc
- Move exp giving to the script engine:
--> Allows to implement the old behaviour (and more) in the scripts
- Remove the exp tag from the monster definition:
+ Since the server itself does not require it anymore it feels wrong to
require it for EVERY monster. TODO: Add a system to add properties to the
monsters/items.xml which allow defining things like the exp and allows to
read the value from the script engine.
+ Small drawback, but it should not be hard to implement this property
system.
- Drop the level networking and calculation.
+ level calculation will happen via the attribute system later but i would
prefer to do this in a seperate patch since this patch already got longer
than expected especially since this requires to make setting correction
points and available status points scriptable.
+ The level would be simply set as a attribute, the int number of it will be
the level, the remaining digits will be the % number till the next levelup.
- NOT remove any existing skill tables in the database update scripts.
+ There is no way to move them into the attribute table in a unified way
(there are too many different way they could have been used). So server
admins have to care about moving theirs skills to attributes themselves.
+ Keeping the old tables does not hurt for existing databases. So removing
does not give any advantage/is required anyway. The now obsolote info
about the EXP transaction is not removed for updated databases either.
(The update script basically only bumps the version number without doing
anything else.
- bump the network protocol version --> old clients won't be able to connect.
- bump the database version --> serveradmins need to update their db.
|
|
|
|
I am really bad at spelling verbosity :->
|
|
|
|
Mana-mantis: #506.
|
|
|
|
Items also have positions, so the ItemComponent only makes sense as part of
an Actor. Later on it will probably be part of an entity that also has an
ActorComponent.
Since it was annoying to update all the places where items were created,
I've introduced a function for this.
The component types are now prefixed with "CT_" because I wanted to introduce
an 'Item' namespace which would otherwise be conflicting. The component types
enum isn't used much in the code so it can look a bit ugly.
Reviewed-by: Yohann Ferreira
|
|
If you set net_gameServerName you can now reserve maps in the maps.xml.
There you have to add the servername - property to the <map> tag.
Then the map will only be activated by that server.
Also changed the activate sequence that the account server now tells the game
server what maps to activate (previously the server requested all maps and the
account server said yes or no).
TODO: Fix general inter server map switching.
|
|
Reviewed-by: bjorn.
|
|
|
|
Allows inspection of message data. It is off by default since it consumes
additional bandwidth, but it can be turned on using the net_debugMode option
in manaserv.xml.
Currently the option only affects outgoing data for each host individually.
In particular, enabling this debug mode for the server does not automatically
make the client annotate its messages.
Reviewed-by: Erik Schilling
|
|
The timeout remembers a reference point of time against which it can check
how much time is remaining.
Reviewed-by: Erik Schilling
Reviewed-by: Yohann Ferreira
|
|
- Made the current charge being saved.
- Added script binds:
- chr_set_special_recharge_speed
- chr_get_special_recharge_speed
- chr_set_special_mana
- chr_get_special_mana
- get_special_info
- Added special info lua class. Functions:
- name
- needed_mana
- rechargeable
- on_use
- on_recharged
- category
Further the engine no longer sets charge to 0 after using of specials
this allows more flexbilillity (like failing specials).
Changes on the xml database:
- recharge renamed to rechargeable (needed by client and server)
- needed - the needed mana to trigger a special (server only)
- rechargespeed - the defailt recharge speed in mana per tick (server only)
- target - the type of target (either being or point) (server and client)
I also made the lua engine pushing nil instead of a 0 light userdata when
the pointer was 0.
Database update needed.
Change is tested.
Mana-Mantis: #167, #156
Reviewed-by: bjorn.
|
|
No more Lua state for each status effect, monster, item effect or map. All
scripts are loaded into the same state. This should be more efficient overall
and make it easier to implement dynamic reloading of the scripts in the
future.
Now, this introduces the problem of name collisions between different Lua
scripts. For now this is solved by using more specific function names, like
'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however
to get rid of these globals, and register these callbacks from the script,
so that they can be local functions without the danger of colliding with
other scripts.
Reviewed-by: Erik Schilling
Reviewed-by: Yohann Ferreira
|
|
These scripts could trivially share one script state, since the methods
called on them from the server are not overlapping. This does leave them
open to access each other's global variables, but that's the problem
with global variables.
The one remaining global script file name is now configurable, so that
it may also be set to a script in a different scripting language. The
two related script options are:
script_mainFile (default: scripts/main.lua)
script_defaultEngine (default: lua) - renamed from defaultScriptEngine
Reviewed-by: jurkan
Reviewed-by: Yohann Ferreira
|
|
* Not nice to pass boolean parameter to constructor for preventing the
timer from running on creation. Just call 'start' on it explicitly.
* getTimeInMillisec could be made static.
Reviewed-by: Yohann Ferreira
|
|
Also, removed the fallback to the standard config file path when a
config file path is specified on the command line. Surely that's not
what you would want to happen.
Reviewed-by: Yohann Ferreira
|
|
log_accountToStandardOutput and log_gameToStandardOutput have been
merged together as log_toStandardOutput.
Reviewed-by: Yohann Ferreira
|
|
Reviewed-by: o11c.
Note: the initialize/reload() api problem will be fixed in another
commit.
|
|
Ack-by: o11c.
|
|
In fact, the client never prefixed that file. Hence, the server
doesn't have to.
|
|
This, instead of the mana-skills.xml file, to follow latest
client changes.
|
|
A client can craft something using the @craft command.
The command needs a list of item names and amounts. The gameserver checks
if the character has these items in the inventory and then passes the list
together with the character handle to the lua script function on_craft in
the script file scripts/crafting.lua.
This function can then be used to evaluate if the list is a valid crafting
combination and when this is the case take or give items.
Implemented two example crafting scripts there, one which enforces exact
item order and amount and one which doesn't. Both are disabled per default
and one needs to be enabled by uncommenting a line.
Also gave the player group permission to use the @craft command in
permissions.xml and added two new items (wood and iron) required for the
example crafting combination.
Resolves: #333
Reviewed-by: bcs86, Bertram
|
|
Before that, all the loading information were kept at info level.
Trivial.
|
|
* Rely on the fact that a std::string is empty by default
* Use std::string::empty() rather than comparing to ""
* Construct with std::string() rather than from ""
Reviewed-by: Bertram
|
|
Reviewed-by: Thorbjorn
|
|
Both servers deinitialize enet now from deinitializeServer().
Reviewed-by: Bertram, Jaxad0127
|
|
|
|
As the protocol version isn't something the maintainers should
set, I removed the net_clientVersion irrelevant option, replaced
by the corresponding define PROTOCOL_VERSION
in the manaserv_protocol.h file.
A corresponding change in the client will be made.
N.B.: Now, the Enet version is also reported in the log.
Reviewed-by: Jaxad.
|
|
Reviewed-by: CodyMartin.
|
|
Changes:
============================================================
For the account server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_accountServerAddress,
net_listenHost -> net_accountHost
net_accountServerPort -> net_accountListenToClientPort
net_accountServerPort +1 -> net_accountListenToGamePort
For the game server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
net_gameServerAddress -> net_gameHost
net_gameServerPort -> net_gameListenToClientPort
For the chat server:
------------------------------------------------------------
Old -> New
------------------------------------------------------------
-> net_chatHost
net_accountServerPort + 2 -> net_chatListenToClientPort
Special fallback feature, as requested by Freeyorp:
When the net_accountListenToClientPort (default to 9601)
is set, the 3 others ports will automatically offset from it,
if they're not set, following this rule:
net_accountListenToGamePort = net_accountListenToClientPort + 1
net_chatListenToClientPort = net_accountListenToClientPort + 2
net_gameListenToClientPort = net_accountListenToClientPort + 3
Resolves: Mana-Mantis #216.
Reviewed-by: Jaxad0127.
|
|
Also added an header to the autoattack.{h,cpp} files.
Big but trivial fix.
|
|
Also made both servers appends on the main log at start
if they aren't empty.
This permits not to lose the previous logs
when quicky restarting the servers.
Trivial fix.
|
|
This patch adds options to enable log rotations
base on files size and or change of date.
Note: Zip support will be added in a second commit.
Reviewed-by: CodyMartin, Thorbjorn.
|
|
Also made some small cleanups.
Resolves: Mana-Mantis #241
Reviewed-by: Jaxad0127.
|
|
Also made random code format clean-ups.
Resolves: Mana-Mantis #217
Reviewed-by: Jaxad0127.
|
|
Also turned the absence of an inter-server password into a fatal
error while documenting it in the manaserv.xml example file.
Reviewed-by: Jaxad0127.
|
|
Now, it's possible to set a different config filename and path
on the command line.
Reviewed-by: Jaxad, Kage.
|
|
Conflicts:
src/account-server/storage.cpp
src/game-server/being.cpp
src/game-server/being.hpp
src/game-server/character.cpp
src/game-server/character.hpp
src/game-server/gamehandler.cpp
src/game-server/inventory.cpp
src/scripting/lua.cpp
src/sql/mysql/createTables.sql
src/sql/sqlite/createTables.sql
|
|
|
|
Instead of searching for the configuration file in ~/.manaserv.xml, the
file is now expected to be in the working directory of the server. The
logs and statistics will also be written there.
This should make it easier to run differently configured servers on the
same machine, and should also be a bit more straight-forward to setup.
Reviewed-by: Yohann Ferreira
|
|
I also made it required to start properly since it's now the case.
Reviewed-by: Jaxad0127.
|
|
Attribute system:
Structure is no longer completely hardcoded. Attributes and structure is
defined by new xml file (defaulting to stats.xml)
Structure defines non-base modifications to an attribute, to be used by
modifiers from items, effects, etc.
Calculating the base value for core attributes is still done in C++ (and for
such fundamental elements the only reason I can think of to do it any other
way is perhaps being able to quickly change scripts without a compile could be
useful for testing, but such things are a low priority anyway)
Item structure:
Modifiers are now through triggers rather than single events. This also
removes hardcoded types - an item could be both able to be equipped and be
able to be activated.
Item activation no longer consumes by default, this must be specified by the
property <consumes /> inside the trigger.
Currently only attribute modifications, autoattacks, and consumes are defined
as effects, but stubs for others do exist. Autoattacks are currently
non-functional, and this should be rectified with some urgency.
Auto Attacks:
AutoAttacks are now separate entities, though not fully complete, nor fully
integrated with all beings yet. Integration with the Character class is
urgent, integration with other Being children less so.
When fully integrated this will allow for multiple autoattacks, through
equipping multiple items with this as an equip effect or even through other
means if needed.
Equipment structure:
As ItemClass types are no longer hardcoded, so too are equip types. An item
have multiple ways to be equipped across multiple equipment slots with any
number in each slot. Character maximums are global but configurable.
Miscellaneous:
Speed, money, and weight are now attributes.
Some managers have been changed into classes such that their associated
classes can have them as friends, to avoid (ab)use of public accessors.
The serialise procedure should also be set as a friend of Character (both in
the account- and game- server) as well; having public accessors returning
iterators is simply ridiculous.
Some start for such cleanups have been made, but this is not the primary focus
here. Significant work will need to be done before this is resolved
completely, but the start is there.
BuySell::registerPlayerItems() has been completely disabled temporarily. The
previous function iterated through equipment, yet in the context I think it is
intended to fill items? I have been unable to update this function to fit the
modifications made to the Inventory/Equipment/Possessions, as I am unsure what
exactly what it should be doing.
ItemClass::mSpriteId was previously unused, so had been removed, but I
notice that it was used when transmitting equipment to nearby clients.
Experimentation showed that this value was never set to anything other than
0, and so has been left out of the ItemManager rewrite.
I am not entirely sure what is happening here, but it should be worth looking
into at a later time, as I am not sure how equipment appearences would be sent
otherwise.
|
|
character.
Added script call for getting the cost of a special (recharge only for now)
Deleting specials works server-sided but the client isn't informed about it properly. Specials without recharge cost don't appear for the player. Both of these features require an additional netcode message.
Reviewed-by: Freeyorp
|
|
Makes the code a little nicer.
|
|
The new parameters in the manaserv.xml file can be used to do so:
log_accountServerLogLevel
log_gameServerLogLevel
Also, updated the sample manaserv.xml accordingly.
Reviewed-by: Thorbjorn.
|
|
Reviewed-by: Thorbjorn, Jaxad0127
|
|
Instead of loading data from a 'data' directory in the current working
directory, the server now uses clientDataPath and serverDataPath as
specified in the configuration. This removes the need to set up symbolic
links in order to merge these two types of data.
The default values point to example/clientdata and example/serverdata,
where a minimal example world can be developed to make setting up an
initial server quick and easy.
The XML::Document convenience class was copied over from the client.
Also, the ResourceManager is now shared between both servers, since the
account client is reading items.xml.
Reviewed-by: Jared Adams
|
|
script into a method of class LuaScript
Reviewed-by: Jared Adams <Jaxad0127@gmail.com>
|
|
Reviewed-by: Jared Adams <Jaxad0127@gmail.com>
|