PDA

View Full Version : Loading custom data from config files



acropole
11-07-2009, 08:26 PM
Hi,

I would like to load a lot of data at map startup.
Those data will be loaded by the server and dowloaded by clients so all players will use the same data and it can be defined by the server admin.
It load teams containing player classes containing classes skills, weapons and other features.

In XML it looks like :

Map's team file :


<!-- mapName.xml -->
<Team name="a" />
<Team name="b" />Teams files :


<!-- teamName.xml -->
<Class name="classa" />
<Class name="classb" />
<Class name="classc" />
<Class name="classd" />
<Class name="classe" />
...Classes files :



<!-- className.xml -->
<Skill name="skilla" />
<Skill name="skillb" />
<Skill name="skillc" />
<Skill name="skilld" />
<Skill name="skille" />
<Skill name="skillf" />
<weapon name="weapona" />
<weapon name="weaponb" />
...So, when the player will join the game he will had to chose a team, then a class and will be able to use some skills and weapons.

Sadly, their is no way to load XML data. Only the config file could be used but I don't find a good place to define all this.

Any idea ?

elmuerte
11-10-2009, 07:20 AM
Why can't you use the configuration system for this?

You could also use the datastore functionality (i.e. the stuff that is also used for loading map and inventory data).

acropole
11-10-2009, 07:35 AM
Is it possible to load datastore from an ini file or something like ? All datastores in the scripts are linked to UI, but there is no UI on the server.

Is it possible to create a mapName entry in the ini files without creating a new script ?

I forgot to say that the server admin can change all those data, in my idea.
So he can create new teams and new classes for each map without writing any script.