It seems it is restricted to certain states of the game. In my game I would need to be logged in already, so the client has access to some variable in the player (i.e. amount of characters available to create) since I need to restrict how many characters a player can have. Those characters are wrestlers for the trainer (player).
Right now I'm handling them as RPSlot with the RPClass in them, but I would like to have access to them for stats, etc.
Is only inside onAvailableCharacterDetails (client) where this can be done?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In RPRuleProcessor.createCharacter() the creation of a new character can be prevented. And the client can decide to show the user interface for creation based on the information in onAvailableCharacterDetails. It gets a map of character names to RPObjects as parameter. Those RPObjects contain all information stored about the characters.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems it is restricted to certain states of the game. In my game I would need to be logged in already, so the client has access to some variable in the player (i.e. amount of characters available to create) since I need to restrict how many characters a player can have. Those characters are wrestlers for the trainer (player).
Right now I'm handling them as RPSlot with the RPClass in them, but I would like to have access to them for stats, etc.
Is only inside onAvailableCharacterDetails (client) where this can be done?
I applied your patch to allow character creation during an active game.
If the limit on number of character is global, you can define it in server.ini: https://stendhalgame.org/wiki/Configuration_file_server.ini#Limits
In RPRuleProcessor.createCharacter() the creation of a new character can be prevented. And the client can decide to show the user interface for creation based on the information in onAvailableCharacterDetails. It gets a map of character names to RPObjects as parameter. Those RPObjects contain all information stored about the characters.
It seems like the RPSlot information is lost even when the create message is received. It is not there from the start. Take a look at my feedback on the chat logs:
https://stendhalgame.org/chat/2015-01-13.html
and the start of
https://stendhalgame.org/chat/2015-01-14.html