Finding your way around the Stendhal Server Code

From Arianne
Revision as of 22:00, 31 December 2007 by imported>Hendrik Brummermann
Jump to navigation Jump to search

Are you trying to find your way around the source code of the Stendhal server? Then you should continue reading here as it is going to be explained. This document expects that you have basic knowledge of Java and have already configured your Development Environment.

So, you can find the main server code in the package games.stendhal.server and some more dependencies in games.stendhal.common.

Packages

So lets have a look at the packages in games.stendhal.server:

package name purpose
actions commands send by players from the client to the server
core the main logic of Stendhal which keeps all the pieces together
entity everything you can interact with in game (players, monsters, items, portals, ...)
events events send from the server to the client
extensions ignore this for now
maps all the interactive stuff of maps (including quests, npcs)
script Misc Scripts that can be executed by GMs (see Scripts For Admins)
util just a few methods that make coding easier

actions

In the games.stendhal.server.actions package the command send from the clients are handled. This includes all the /-commands that can be entered in the chat line but also things like moving around, attacking creatures. We are currently restructoring this package into subpackages to make it easier to find things.

core

The core package includes the basic infrastructure of Stendhal. In case you just want to add NPCs, quests, maps, dungeons, items and monsters you will not need to change anything here. Have a look at the packages entities, maps, actions and events.

entity

events

maps