Rev Whatever --- It's the last version we used at RoseZA

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

KTRose Source code release

Postby NewMilenium on Wed Jan 11, 2017 1:05 pm

Well I guess you don't know for your new_drops.xls then :P .

For the moment I'm at that point. I guess that wouldn't be needed if I could edit them directly in Excel.

Next work will be to try to import the skills from your NArose sources to this server... Which obviously isn't going to be possible if they don't run the same way at all. But at least that's the same files so far, I think... Worth a shot.
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

Re: KTRose Source code release

Postby PurpleYouko on Wed Jan 11, 2017 4:05 pm

you CAN edit them directly in excel

Save or load to.from a CSV

The database can be dumped into a CSV which will load into excel. Excel can save as a CSV which can then be uploaded into your database

It's a bit of a clunky way to do it but it works.

Are you using the Visual Studios version of KTRose or the Codeblocks version? The codeblocks version actually works a bit smoother and has less issues with timings. Something different in the compilers seems to make the VS version more jumpy and I didn't really have time to work on it any further after converting the source.

So i went to look at the drops code. KTRose is using a function called GetNewDrop in ServerFunctions.cpp
It doesn't look like one of my better bits of code TBH ;)
But it is doing it with a pretty decent method.
First it decides whether it is a map or mob drop (50% chance for each which isn't really right but whatever. Should be taking Mob Drop from "item drop" in LIST_NPC.STB but in this instance it isn't)
Each drop list (one for each map or monster type) must have a grand total of 100,000 when all the drop chances for the entire row is added
then it spits out the item

I have lately been working on a different server/client which works pretty well. It's the old RoseZA test client which we were developing AFTER dev rev 4 was abandoned.
I don't have a GIT or SVN repo set up for it at this time but it is available as a download from my mega account.

Server
https://mega.nz/#!HE9HyZ6Y!1WXkkVT5jFs8Z3Exrl6gHURTPSz4Rf0hbJtfgIP1Los

client (version 274 evo)
https://mega.nz/#!6N0nVRAY!QS7ECBxeSYCoc4I7HNNDXPMtb5ADSY2eAREaO8r0CbM

That version of the server runs very well but some quests aren't working.
I do know how to make them work properly and have done so on my local server but the zip was made well before that.
If there is enough demand I might be persuaded to set up a GIT repository for this server version.

Setting up the database is a bit of a pain too but it isn't too hard. :)



The server then picks a random number from 1 to 100,000 and scans the drop list to see which item is selected.

[ABE]
We now have a git repo for the server
https://github.com/PurpleYouko/rosZA_server
Quests are fixed and so is a strange crash that always happened when going to Zant. It was caused due to some out of place code that was erroneously interpreting mini bees as tower defense mobs. This server doesn't even have a complete working tower defense system in place
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4594
Joined: Fri Aug 10, 2007 2:05 pm

Re: KTRose Source code release

Postby NewMilenium on Wed Jan 11, 2017 5:36 pm

I can't. As I said earlier, the excel doesn't load the database. I asked
so, 3) any idea where I can be sure of what to write at the "Driver" line of your new_drops.xls, so I can fix the values of the drop chances? It seems unhuman without Excel here.

because my guess is I've put wrong values (I tried several) in there (the "config" tab of new_drops.xls).
When I try to save to a CSV, it does an error, and shows in yellow the " .Open" in VBA, here :
  1.  'cnMySql.cursordriver = rdUseOdbc
  2.   With cnMySql
  3.     .ConnectionString = ConString
  4.     '.ConnectionString = "uid=root;pwd=sproggins;server=localhost;" & _
  5.     "driver={MySQL ODBC 3.51 Driver};database=rev81;dsn='';"
  6.     .Open
  7.   End With
  8.   'MsgBox ("connected to the DB successfully")
  9.   'Cells(1, 10).value = "connected to Database"
  10.   Exit Sub


I would love to use excel to change the drops.


I am using the codeblock version; as I said earlier, I still have to launch WorldServer via the debugging function of CodeBlocks, just like someone else posted in that very thread - otherwise it crashes.
Are you sure about that total that should be 100000? I'm asking for 2 reasons,
first, some other guy said "whatever anyone says, it doesn't have to add up to 100000 or any total, it is just made easy for us to convert to percentages", and I get the idea.
Second, I just finished entering a query that permitted me to change the whole new_drops database, I basically did that :
chance100 = CASE WHEN chance100 <= 0 THEN chance100
WHEN chance100 < 10 THEN chance100 * 100
WHEN chance100 < 20 THEN chance100 * 80
WHEN chance100 < 50 THEN chance100 * 50
WHEN chance100 < 100 THEN chance100 * 30
WHEN chance100 < 200 THEN chance100 * 10
WHEN chance100 < 400 THEN chance100 * 2
WHEN chance100 <4000 THEN chance100
WHEN chance100 <8000 THEN chance100 / 2
ELSE chance100 / 4

for all "chanceN" columns.
And so far, the tests show the mobs finally drop some equipables. No error for now. I can imagine a side issue if the totals HAVE to be 100000; if my current total is inferior, sometimes the mob won't drop when it is supposed to, if the total is superior, then some drops will never drop...??


For the last rose version you're talking about, what are the differences? Because from my poor and little point of view for now, I have :
+ I finally managed to change some UI elements,
+ all working fine, except :
- the HP and MP seem often incorrect, on me and on mobs.
- gotta check that the 100000 total is respected,
- gotta change the skills to improve them / change them to those nice NArose skills,
- gotta rise backpack size (should be easy and done in next 30 minutes),
- gotta rise the time drops stay on the floor.
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

Re: KTRose Source code release

Postby NewMilenium on Wed Jan 11, 2017 6:15 pm

Okay, my ServerFunctions.cpp is as you said.

This is going to be a nightmare. I must find a way to fix the excel file or I'll never be able to change the drop values correctly.
Everything I tried so far to write the "driver" in the config hasn't worked.


And of course, because I've written it should be easy to change max weight, it's not. I changed it in playerstats.cpp , and it doesn't reflect in-game, even after changing my weight and obtaining the old max weight (variable : weight, calculation function of strength and level).

And I can't find where is defined the time drops stay on the floor.

But it's good to have mobs dropping (simili-)all sorts of items. :)
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

Re: KTRose Source code release

Postby PurpleYouko on Wed Jan 11, 2017 9:21 pm

ok then....

First. You don't need to use VBA to save the data to a csv. Excel can save CSV natively. Just choose save as, name it as a csv. (testFile.csv or whatever) Excel will just save it that way and you can import it directly to a database from that format.

If you want to actually use excel to read/write to/from a mysql database that is quite possible too. I do it all the time.
I don't actually remember releasing an excel sheet with mysql in it. Lol. let me go find it a moment.

Well I can't find an editor named new_drops.xls. I do have a file by that name but it certainly isn't an editor. It doesn't actually contain a drops list at all in fact..

So anyway assuming that I did make such an editor and have since lost the stupid thing....
In the config tab there will be a line that defines the mysql driver right?
It probably says this {MySQL ODBC 3.51 Driver}
if so then that is a driver specific to a 32 bit operating system. It won't work at all in a 64 bit system

To get it working you will first have to download and instal la mysql driver. you can do that here http://dev.mysql.com/downloads/connector/odbc/5.3.html
Grab the 64 bit msi installer file and run it to install the connector to your computer
now in the config page put in {MySQL ODBC 5.3 ANSI Driver}

Run up xampp or whatever you use for your database manager and then start your excel file. It should work then.

first, some other guy said "whatever anyone says, it doesn't have to add up to 100000 or any total, it is just made easy for us to convert to percentages", and I get the idea.

If i were you i would listen to the person who actually designed that drop system and wrote all the code for it.. OOH! that would be me :mrgreen:
I designed it, not as a percentage system, but a base of 100,000 exactly. If you have less than 100,000 it's possible for the randomizer to come back with 100,000 and go off the end of your data (no harm done but you won't get a drop) If you have a total of More than 100,000 then it is impossible to reach the last few items or maybe a part of one of them.
The way it works is this. I'm using a kind of analogy here. Not exact code.
The total drops pool is made up of exactly 100,000 little boxes. Each item from the list (a specific row in the drops data. for example row 101 which would be a mini jelly bean) is added such that it fills a number of those boxes. Say item 1 has a chance of 20. it sits in the first 20 boxes so any roll of 1 to 20 selects that item. Item 2 may have a chance of 30 so it sits in boxes 21 through 50. A roll 21-50 would select it. And so on al the way up to 100,000. If the last item on the list has a chance of 200 but by the time it is reached, we have already filled all the boxes up to 99,995 then there are only 5 boxes left so the remaining 195 chance overflow and are lost. Does that make sense?

For the last rose version you're talking about, what are the differences? Because from my poor and little point of view for now, I have :

The RoseZA test server and client that I linked to are based on ROSE Evolution. Much more similar to the actual rose game that you will find at NARose.
It has a working costume system, many more maps including all of Eldeon and Orlo, totally different skills and skill trees, more quests and so on.

KTRose is built on Pre-Evolution client 112 which was in use right at the start of the official Rose servers back in 2006. It is a halfway point between the earlier irose and the later Evolution rose. It appeals to some of us simply out of nostalgia but to be perfectly honest it was never really as polished as evolution.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4594
Joined: Fri Aug 10, 2007 2:05 pm

Re: KTRose Source code release

Postby NewMilenium on Wed Jan 11, 2017 10:33 pm

Ah yeeees the CSV method is going to make it way easier.
This is going to be useful if I can't solve the new_drops.xls issue --> However, do you know if it's possible to export the database table to a csv, to then open it in Excel?

About the new_drops.xls : oh well you can easily find your own posts where you're talking about it, on those very forums. :)
In my KTrose version you uploaded, it is in ktrose_trunk\Binary\Tools.
Before telling you here I had a problem, I already searched, found this page, checked my drivers, tried them all (for 64 bits). I already have MySQL ODBC 5.3 ANSI Driver installed as I'm using MySQL for the database and MySQL Workbench for accessing it.
Image



The problems I posted previously still exist, sadly. On Load, nothing happens. On Save,
Image



then, when clicking debug,
Image




Damn, if you say that server has the skills that interest me... i'll have to give it a try very soon. Are the drops handled the same way? If not, it potentially means I'm doing all those drop changes for nothing......
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

part 2

Postby NewMilenium on Thu Jan 12, 2017 1:05 pm

So far : I'm trying to get this server and client working.
I had to do quite some things already ; I added some new columns to list_config in the database.


=====| Still an issue : |====
At some point I decided to try rebuilding the 3 servers (with codeblocks) to see if the errors could come from the downloaded exe.
Rebuilding WorldServer gave that (except I change here my path to [MY PATH]) :
||=== WorldServer, default ===|
[MY PATH]\RoseZA SVN\SVN\trunk\World Server\quest\QuestActions.cpp||In function 'int QUEST_REWD_029(CWorldServer*, CPlayer*, byte*)':|
[MY PATH]\RoseZA SVN\SVN\trunk\World Server\quest\QuestActions.cpp|1312|error: 'struct STR_REWD_029' has no member named 'szNextTriggerSN'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 34 seconds) ===|


the corresponding lines are

  1.    QUESTREWD(029)
  2. {
  3.     GETREWDDATA(029);
  4. char* tempName = reinterpret_cast<char*>(&data->szNextTriggerSN) - 2;



=====| Next problem, SOLVED : |====
But the issues are the same so far; while the Login server works, no connection seems to be done from the client to the Char server. On the client, we see the channel "Test001" and clicking on it / validating does nothing. Nothing on the server windows either. The Char server shows no error though.
I went through the conf, copied the 3 client 3DDATA subfolders to the server, checked the database... So far, I'm stuck there.
EDIT : it really seems that absolutely nothing happens when the client clicks on the big Image, nor when I doubleclick on the Channel. I checked Char log, Login log... Nothing at all.


==> solved by changing serverid to 2 in worldserver.conf, because it was at 1 and charserver too.



=====| SOLVED : |====
And the (originally compiled) worldserver doesn't seem to work anyway, after adding tons of tables to please it, now it wants a whole table "lotto_config" and I can't find that anywhere.
EDIT : I found a post on those forums with the same problem. I downloaded the sql file uploaded by thriel and took only the parts about the Lotto to update the database.
Now I can't find what it is telling me; "unknown column 'ExpansionTime' in 'field list' ". What field list? A search of "ExpansionTime" on those forums gave nothing. I'm searching...

SOLVED : I added many missing columns in the table "accounts", with the according types (thanks to thriel sql file).


=====| ISSUE : |====
whenever I attack, it does nothing and the WorldServer says "[HACK]: NewMilenium starts attack".


I like the UI though, and the skills should be the interesting ones. Man, if I can solve those issues and get it working nicely, it will be awesome! Thanks PurpleYouko!

I'm editing this post as long as I get no answer and when I got something new.
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

Re: KTRose Source code release

Postby PurpleYouko on Thu Jan 12, 2017 3:45 pm

NewMilenium wrote:=====| Still an issue : |====
At some point I decided to try rebuilding the 3 servers (with codeblocks) to see if the errors could come from the downloaded exe.
Rebuilding WorldServer gave that (except I change here my path to [MY PATH]) :
||=== WorldServer, default ===|
[MY PATH]\RoseZA SVN\SVN\trunk\World Server\quest\QuestActions.cpp||In function 'int QUEST_REWD_029(CWorldServer*, CPlayer*, byte*)':|
[MY PATH]\RoseZA SVN\SVN\trunk\World Server\quest\QuestActions.cpp|1312|error: 'struct STR_REWD_029' has no member named 'szNextTriggerSN'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 34 seconds) ===|


the corresponding lines are

  1.    QUESTREWD(029)
  2. {
  3.     GETREWDDATA(029);
  4. char* tempName = reinterpret_cast<char*>(&data->szNextTriggerSN) - 2;



That one is quite easy to fix when you know how.
The data structure comes in from QuestActions.h
  1. // use LUA function
  2. //LMA: used now.
  3. struct STR_REWD_029 {
  4.     word strLen;
  5.     string LuaName;
  6. };

I don't know why Lmame changed the name from szNextTriggerSN to LuaName in this structure when he ported the code in from KTRose but as he did so then you need to do the same thing in QUESTREWD(029)

QUESTREWD(029) needs to look like this
  1. QUESTREWD(029)
  2. {
  3.     GETREWDDATA(029);
  4.     char* tempName = reinterpret_cast<char*>(&data->LuaName) - 2;
  5.     dword hash = MakeStrHash(tempName);
  6.     if( client->questdebug )
  7.         Log(MSG_QUESTDEBUG, "QUESTREWD(029):: Execute Client LUA %s[%d] [%08x]", tempName, data->strLen, hash);
  8.     return QUEST_SUCCESS;
  9. }



=====| Next problem, SOLVED : |====
But the issues are the same so far; while the Login server works, no connection seems to be done from the client to the Char server. On the client, we see the channel "Test001" and clicking on it / validating does nothing. Nothing on the server windows either. The Char server shows no error though.
I went through the conf, copied the 3 client 3DDATA subfolders to the server, checked the database... So far, I'm stuck there.
EDIT : it really seems that absolutely nothing happens when the client clicks on the big Image, nor when I doubleclick on the Channel. I checked Char log, Login log... Nothing at all.


==> solved by changing serverid to 2 in worldserver.conf, because it was at 1 and charserver too.



=====| ISSUE : |====
whenever I attack, it does nothing and the WorldServer says "[HACK]: NewMilenium starts attack".

The message means nothing. I don't know why it says "hack" but whatever. It does the same for me. It's just a debug message
However my attacks work just fine so i don't know what else could be wrong there.


You will run into a problem with getting quest rewards soon enough. Just post up here when you get that far and I will give you the fix for it.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4594
Joined: Fri Aug 10, 2007 2:05 pm

Re: KTRose Source code release

Postby NewMilenium on Thu Jan 12, 2017 5:22 pm

1) Fixing the WorldServer compilation :

When I try your lines instead of the ones I had, it does (with my path instead of [PATH])

[PATH]\RoseZA SVN\SVN\trunk\World Server\quest\QuestActions.cpp||In function 'int QUEST_REWD_029(CWorldServer*, CPlayer*, byte*)':|
[PATH]\RoseZA SVN\SVN\trunk\World Server\quest\QuestActions.cpp|1315|error: 'MSG_QUESTDEBUG' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 35 seconds) ===|


I would define MSG_QUESTDEBUG myself if I knew how. :-S

Soooo I tried a mix of your code and the one I had in there, but of course it then does more errors.




2) Using the already compiled WorldServer :
so far I find nothing on how to fix that impossibility to attack. Besides that, it seems okay; a fairy appears behind me... Mobs attack me pretty fine... But I can't strike back at all, and each time I try, there is still that line in the worldserver.

Edit to add infos:
interestingly, when I do the Dual Scratch skill on a jelly bean, it does that (see 17:28:01, in a red rectangle) :

Image

(that image can be opened to see it fully)
and the character runs back and forth the jelly bean without doing anything. And it does that forever. The jelly bean doesn't attack me neither.
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

Re: KTRose Source code release

Postby NewMilenium on Thu Jan 12, 2017 6:00 pm

What the..? It works now. I only restarted the server and put my screen resolution, and in full screen instead of windowed.

Yes, I see the quest window do not show the proof of exterminations.
Still investigating things.

When I logged off, then back in, I got the reward (it seems) for the 10 Flanae quest, and the quest is gone from my list, while this didn't happen while I was killing the Flanae in the first place.

There is absolutely 0 drop.

Crash when going in Zant, I'm pretty sure I can fix that thanks to those forums. I read tons of things where you helped someone solving this.
NewMilenium
Smoulie
Smoulie
 
Posts: 33
Joined: Wed Jan 04, 2017 12:54 pm

Next

Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 3 guests