KTRose Source code release
Posted: Fri Dec 07, 2012 6:22 pm
As I promised a while ago, Here is the release of all things KTRose
The KTRose client is available here. It is a modified version of the pre-evo 112_112 client.
the 112 is the only client that will work with this server unless you make some pretty big changes.
This version is the most up to date.
KT-Rose Updated 2015
IMPORTANT When you first run it, make sure to run triggerdetect.exe before you start up the game.
A lot of people have reported that they do not see NPC dialog if they skip this step.
I've just uploaded the entire source (and binaries) along with all the sql data you will need to an svn repository.
All the necessary AIP, STB and QSD files are in the server already and if you run the KTRose launcher before trying to run the client on your own server, you will be able to download all the patches that will bring your client up to the newest revision so that all the files will match properly.
The repository is here
https://subversion.assembla.com/svn/ktrose-source/
Just type that into Tortoise SVN and check it out
What is KTRose?
KTRose started out as an OsProse but over the years it has been modified extensively.
Differences:
The Quest system is stored completely differently in the database.
In previous versions the data was saved as a binary BLOB dump of the memory space currently used by the player's quest data. This is a perfectly good method and is in fact a lot more efficient than my new system. The problem is that you can't read the data from the QSL table directly so it's hard to debug problems in the quest code.
KTRose quest data is saved in a way that makes it much easier to read directly from the database so you can edit player's quests directly if you know what you are doing.
Storage and Inventory are stored very differently than any other Osrose server has ever been.
I never really liked the way that on saving the player data, it first had to delete all inventory and storage entries for that player from the database before re-writing them all. It seemed a bit risky to temporarily have no data whatsoever stored in the database. If the server should fail at this point then everything would be lost.
With this new system, the entire inventory of a player is stored in a single row of the database so it can be quickly updated on the fly with a single query.
KTPoint system. This is a reward point system that can be used for many purposes including points for donations and points for time logged in to the server (1 per hour maybe? it's configurable easily enough).
The accounts table has a new field called "newpoints". You can add reward points into this field at any time directly in the database. There is not even any need for the player to log out. The next time he looks at his KTPoint totals (in the unions tab) it will be updated automatically.
KTPoints are available to ALL characters within a specific account and will remain so until one of the characters spends the pints in an in-game item shop such as the one run by Keako in adventurers plains (a new NPC that I added for this specific purpose)
The points work as Union Points to all intents and purposes.
You may want to modify things like the name of the name of the custom Union that is set to use these KTPoints. My custom Union is called KuroTejina ^_^
Drops Are diferent.
The PYDrops (and database) code is still present but the default method is now called NewDrops. It is a method more similar to the way that NARose does it.
I have even included an Excel based drops editor in the svn so you can change stuff any time you like.
Spawns:
Where to start?
KTRose spawns are nothing like any other osrose server.
The spawn system uses table list_special_spawns as a default. It's a somewhat complicated system that keeps track of the number of monsters spawned and killed in every spawn area. these values (stored inside the spawn structure) are then used to trigger specific other spawns such as a boss which could be someplace else in the map entirely. For example you could set up an enormous spawn of jelly beans that covers a massive area and has up to 100 jellys present at any one time then you could set your trigger spawn such that when 50 have been killed it will spawn a single Boss monster or a special monster that gives high exp such as a riddler. This special doe not have to be set within the original spawn area. It can be half a map away if you like.
You can also directly control whether a monster can spawn in the day, night or both. Monsters that are day or night only will automatically be deleted when the day chages to night or vice versa.
Spawns can be added on the fly with a GM command. (more on that later if requested)
Tower defense system:
Unfortunately this has never been completed to the point of being fully automated and added to QSD/CON quest system
What we have so far is that a GM can start a stream of monsters (any type and amount he likes) with a command.
The monsters will start from a predetermined waypoint and will procede along a path of waypoints until they reach the final point where they will disappear.
These monsters will be immune to AOE attacks to prevent high level players coming in and wiping them all out.
Here is the eventual aim for this unfinished project.
The idea is that on death they will remove a "life point" from a target NPC. A summoned crystal would do. When the crystal's HP reaches zero then it will switch to a different type of NPC such as a very powerful boss monster which must then be killed in order to reset the crystal for that map.
The motivation?
While the crystal is intact (under player command) then the XP for the entire map can be increased by a multiplier. This will go away when the crystal is destroyed.
Every map (on Junon) has a defined waypoint list in list already present in the list_waypoints sql table. Haven't done Luna yet and pre-evo doesn't even include Eldeon yet.
As with most other things I do, I like to make GM commands for everything so we have a series of commands that will allow a GM (admin really since it requires 900 access rather than the typical GM 300) to create or remove waypoints on the fly within any given map
Known bugs
There seems to be a bug somewhere that locks up the entire server occasionally. I haven't fully tracked it down but I suspect it is something related to clans. It doesn't crash. It just locks. My server would run for days or weeks with multiple players without an issue then suddenly, BAM! it all locks up.
Timings:
Attack timing is still a little buggy.
Cart speeds:
This one is weird. normal carts are fine but when using the faster custom carts, you appear to going really fast on your own screen but others see you going at a snails pace then teloporting. Something funky there but I haven't figured out what yet. All the STB speeds and stuff look fine.
Cart passengers
When you pick up a passenger you can drive around within a certain area and see them on the back.
They, however see you drive away without them.
Once you get beyond visibility range your passenger will vanish.
Shouldn't be too hard to fix this. Just never got around to it.
Well that's about it.
Just follow on of the other tutorials to set it up.
Compiles in Dev c++ or codeblocks
Ask any questions you like in this thread and post any bug fixes in the bug fixes sub forum
The KTRose client is available here. It is a modified version of the pre-evo 112_112 client.
the 112 is the only client that will work with this server unless you make some pretty big changes.
This version is the most up to date.
KT-Rose Updated 2015
IMPORTANT When you first run it, make sure to run triggerdetect.exe before you start up the game.
A lot of people have reported that they do not see NPC dialog if they skip this step.
I've just uploaded the entire source (and binaries) along with all the sql data you will need to an svn repository.
All the necessary AIP, STB and QSD files are in the server already and if you run the KTRose launcher before trying to run the client on your own server, you will be able to download all the patches that will bring your client up to the newest revision so that all the files will match properly.
The repository is here
https://subversion.assembla.com/svn/ktrose-source/
Just type that into Tortoise SVN and check it out
What is KTRose?
KTRose started out as an OsProse but over the years it has been modified extensively.
Differences:
The Quest system is stored completely differently in the database.
In previous versions the data was saved as a binary BLOB dump of the memory space currently used by the player's quest data. This is a perfectly good method and is in fact a lot more efficient than my new system. The problem is that you can't read the data from the QSL table directly so it's hard to debug problems in the quest code.
KTRose quest data is saved in a way that makes it much easier to read directly from the database so you can edit player's quests directly if you know what you are doing.
Storage and Inventory are stored very differently than any other Osrose server has ever been.
I never really liked the way that on saving the player data, it first had to delete all inventory and storage entries for that player from the database before re-writing them all. It seemed a bit risky to temporarily have no data whatsoever stored in the database. If the server should fail at this point then everything would be lost.
With this new system, the entire inventory of a player is stored in a single row of the database so it can be quickly updated on the fly with a single query.
KTPoint system. This is a reward point system that can be used for many purposes including points for donations and points for time logged in to the server (1 per hour maybe? it's configurable easily enough).
The accounts table has a new field called "newpoints". You can add reward points into this field at any time directly in the database. There is not even any need for the player to log out. The next time he looks at his KTPoint totals (in the unions tab) it will be updated automatically.
KTPoints are available to ALL characters within a specific account and will remain so until one of the characters spends the pints in an in-game item shop such as the one run by Keako in adventurers plains (a new NPC that I added for this specific purpose)
The points work as Union Points to all intents and purposes.
You may want to modify things like the name of the name of the custom Union that is set to use these KTPoints. My custom Union is called KuroTejina ^_^
Drops Are diferent.
The PYDrops (and database) code is still present but the default method is now called NewDrops. It is a method more similar to the way that NARose does it.
I have even included an Excel based drops editor in the svn so you can change stuff any time you like.
Spawns:
Where to start?
KTRose spawns are nothing like any other osrose server.
The spawn system uses table list_special_spawns as a default. It's a somewhat complicated system that keeps track of the number of monsters spawned and killed in every spawn area. these values (stored inside the spawn structure) are then used to trigger specific other spawns such as a boss which could be someplace else in the map entirely. For example you could set up an enormous spawn of jelly beans that covers a massive area and has up to 100 jellys present at any one time then you could set your trigger spawn such that when 50 have been killed it will spawn a single Boss monster or a special monster that gives high exp such as a riddler. This special doe not have to be set within the original spawn area. It can be half a map away if you like.
You can also directly control whether a monster can spawn in the day, night or both. Monsters that are day or night only will automatically be deleted when the day chages to night or vice versa.
Spawns can be added on the fly with a GM command. (more on that later if requested)
Tower defense system:
Unfortunately this has never been completed to the point of being fully automated and added to QSD/CON quest system
What we have so far is that a GM can start a stream of monsters (any type and amount he likes) with a command.
The monsters will start from a predetermined waypoint and will procede along a path of waypoints until they reach the final point where they will disappear.
These monsters will be immune to AOE attacks to prevent high level players coming in and wiping them all out.
Here is the eventual aim for this unfinished project.
The idea is that on death they will remove a "life point" from a target NPC. A summoned crystal would do. When the crystal's HP reaches zero then it will switch to a different type of NPC such as a very powerful boss monster which must then be killed in order to reset the crystal for that map.
The motivation?
While the crystal is intact (under player command) then the XP for the entire map can be increased by a multiplier. This will go away when the crystal is destroyed.
Every map (on Junon) has a defined waypoint list in list already present in the list_waypoints sql table. Haven't done Luna yet and pre-evo doesn't even include Eldeon yet.
As with most other things I do, I like to make GM commands for everything so we have a series of commands that will allow a GM (admin really since it requires 900 access rather than the typical GM 300) to create or remove waypoints on the fly within any given map
Known bugs
There seems to be a bug somewhere that locks up the entire server occasionally. I haven't fully tracked it down but I suspect it is something related to clans. It doesn't crash. It just locks. My server would run for days or weeks with multiple players without an issue then suddenly, BAM! it all locks up.
Timings:
Attack timing is still a little buggy.
Cart speeds:
This one is weird. normal carts are fine but when using the faster custom carts, you appear to going really fast on your own screen but others see you going at a snails pace then teloporting. Something funky there but I haven't figured out what yet. All the STB speeds and stuff look fine.
Cart passengers
When you pick up a passenger you can drive around within a certain area and see them on the back.
They, however see you drive away without them.
Once you get beyond visibility range your passenger will vanish.
Shouldn't be too hard to fix this. Just never got around to it.
Well that's about it.
Just follow on of the other tutorials to set it up.
Compiles in Dev c++ or codeblocks
Ask any questions you like in this thread and post any bug fixes in the bug fixes sub forum