Nostalrius 5.0 Final is for sale

The final and latest project is now for sale.

The person who paid me the most amount of money to make him the full replica of Tibia 7.7 not lacking a single feature, monster A.I behavior, or formulas differences which was based on my Nostalrius 1.0, sold my project for 4.000 EURO and continues to, having a 350%+ profit income, by also breaking a “friend” to “friend” contract we both had on not releasing the final Nostalrius server core engine or reselling it without previous chat with me, this was all being done in secret.

All his investments made on me and my programming skills on achieving a true Nostalgia experience was all premeditated with the idea of having huge profit by abusing my immigrant situation as a Venezuelan and by selling it with 350%+ overprice on his made investments on the server.

If you have been offered my server, beware that you may be subject to a scam, I’ve proof of Discord chat of somebody who bought the files from him actually got a very old and deprecated version instead of the true Nostalrius 5.0.

If you’re interested in being the final owner of Nostalrius 5.0 engine, hit me up on Discord and we may discuss pricing, please, beware that you may have to convince me that you will make good use of the files.

My retirement; as it is known, I’m dealing with depression and anxiety issues in real life right now, and only due to the economical situation I’m going through, as a Venezuelan who left Venezuela a year ago, and moved to Ecuador for better opportunities, the doors seem to have been shut over my face in the country, unemployment and xenophobic actions being taken, without mentioning the cost the government has setup for a VISA to legally work here. This is making me take this decision among what was later mentioned. I will continue to work in otland in free lancing, but I will not and have no reason to continue working in Nostalrius further more, the project has been complete for months now without lacking features, however you would receive full support from me.

This is my official Discord: ShadowStorm#1887

Also, if you would just like to purchase some Tibia 7.7 features and implement into your own server, you may contact me as well.

RealOTS Monster Strategies

Since the release of monsters, I do have seen a lot of people question every attribute in a monster file.

# Tibia – graphical Multi-User-Dungeon
# MonsterRace File

RaceNumber = 1
Name = “human”
Article = “a”
Outfit = (1, 0-0-0-0)
Corpses = 4240, 4247
Blood = Blood
Experience = 50
SummonCost = 350
FleeThreshold = 20
Attack = 7
Defend = 5
Armor = 0
Poison = 0
LoseTarget = 0
Strategy = (100, 0, 0, 0)

Flags = {NoSummon,
NoIllusion}

Skills = {(Level, 1, 1, 0, 100, 0, 1),
(MagicLevel, 0, 0, 0, 1600, 3000, 0),
(HitPoints, 150, 0, 150, 0, 0, 5),
(Mana, 0, 0, 0, 0, 0, 5),
(GoStrength, 70, 0, 70, 0, 0, 1),
(CarryStrength, 400, 0, 400, 0, 0, 10),
(Shielding, 10, 10, 0, 100, 1500, 0),
(DistanceFighting, 10, 10, 0, 30, 2000, 0),
(SwordFighting, 10, 10, 0, 50, 2000, 0),
(ClubFighting, 10, 10, 0, 50, 2000, 0),
(AxeFighting, 10, 10, 0, 50, 2000, 0),
(FistFighting, 10, 10, 0, 50, 1500, 0),
(Fishing, 10, 10, 0, 20, 1100, 0),
(Eating, 0, 0, 1200, 0, 0, 0),
(SoulPoints, 100, 0, 100, 0, 0, 0)}

Inventory = {(2854, 1, 500),
(3600, 3, 500),
(3607, 1, 300),
(3031, 20, 600),
(3361, 1, 600),
(3355, 1, 100),
(3577, 3, 400),
(3264, 1, 800)}

At first hand, we can know exactly what each of those things do and why are they there for, so there is really not much we can say about it but there’s an attribute that kills our mind about what does it do “strategy”, to be honest, we pretty much ignored this attribute for a while in our RealOTS versions, as we really didn’t do our best in reverse engineering the game server.

However, after some work and investigation within TMonster (RealOTS monster class), we found the algorithm that uses the strategy attribute, and ended up discovering that:

  • RealOTS Monsters might want to target the lowest HP victim
  • RealOTS Monsters might want to target the most damage dealt victim
  • RealOTS Monsters might want to target the closest target

There’s no random targeting, unless of course certain conditions are met (first target searching).

That’s how monsters target retargeting pseudo code looks like (variable names are user made), and yes the pseudo code can be compiled just fine, and this same behaviour has been moved into TFS.

The Making of RealOTS

What will be of the famous RealOTS franchise?

RealOTS 2016 is a non-profit hobby project, completely free to play made entirely out of RealOTS code base and with the help and support of Dennis (aka Toor).

Do note that I do not tend to post blogs of any kind.

I have to be short concerning the making process due security reasons.

As I write this top paragraph out of the entire blog content, the project is conditionally complete.

Feel free to ask questions about the server and it’s functionality, I will answer you as long as the question does not spoil IMPORTANT information within the code.

This blog was written as I develop the last version of RealOTS.

But how can we develop a server to replace RealOTS entirely out of it’s code base?

It’s not easy task to do to actually develop an entire game server and maintain it’s play style.

Ezzz, released a version of our on going projects we developed on our private git server, it ran for 2 weeks under http://www.realots.net, it pretty much was a good remake of RealOTS game server based entirely on OTServ code base.
Unfortunately there were some bugs at the start of the Test Server, and many of our users complained about it’s “stability” and amount of bugs even though they were just minimal and some user mistakes.

All of them were fixed and addressed, but I wasn’t personally pleased with the version we made, as I was seeing through the code I wasn’t pleased. It was just as hard to main as the real RealOTS, code here and code there, a total mess.

I wanted to have a known stable server, so that I didn’t had to worry about unreported bugs at GIT, things that actually mess your player base.

I discarded the project, and started to look for new ways of developing a good production server to replace RealOTS.

I decided to chose TheForgottenServer 1.1, which personally is the best option to keep my code reliable and keep maintainability.

The future RealOTS replacement?

Downgraded TFS1.1 to work with Tibia 7.7 entirely, including each and all features from 7.7 that I could remember out of my head.

  1. What happens now? What do we do now that we already have the actual RealOTS data?
  2. Reverse Engineer RealOTS game server
  3. Deep search through the code for spells formulas, functionality, monsters behavior and more.

RealOTS Files to TheForgottenServer 1.1 Process

Discard items.xml&items.otb, and make use of RealOTS items definitions to use within our new server code base, this way we are assured to keep real attributes.
All the item data that we need to use the rest of the data files with.

After hours of testing our RealOTS items into TFS we are finally able to continue on our way to use RealOTS under TFS code base. What’s next?

The Map Editor

Our best option is Remere’s Map Editor 3.0, we must edit the source and stop using items.xml&items.otb and instead our RealOTS items file, couple of minutes into this, edit RME data files to use RealOTS item ids (client ids) and setup a test map.

Success!

Map Editor, and server with items, now we lack a lot other more important functionality for our server to be steady playable.

But first, we need to convert RealOTS map to OpenTibia readable format, I personally don’t want to use RealOTS format as it’s slow, like serious slow, think of OpenTibia XML Maps, that slow.

Basic sector file preview, containing the information of a 32×32 area of the game map, there’s over 9000 files of this.

When testing I had to convert single sector files, some containing quests, some containing libraries, some containing deep chain containers, etc… in order to make sure the convertion is correct.

In just a little time the convertion of sector files is 1/1. It’s a relief for those like me who like to see the items inside containers all around Tibia.

And the remaining sectors for this sector in particlar results in

The pinkish red colored tiles are refreshable tiles 🙂

This was a seriously tedious job, don’t get me wrong it required a lot of tests to make sure the converted map was 1/1 of the sector files, but fortunately I succeeded 🙂

And when you are finally able to login on the converted map and are able to appreciate many of the never seen before things.

So far we have our super stable server, items and original map data, what is next? We gotta work on our actions!

In my honest opinion, I have always disliked LUA / XML, it’s disgusting, it’s even stressing to have to look in 2 different folders and in 2 different files just to make a script, e.g; ladder.lua. Please no!

Fortunately, RealOTS comes with it’s own “scripting system” moveuse.dat which unlike NPCs isn’t an interpreted interface.

See the difference?! Just that easy you can add an item with an event!

I never tried to use moveuse.dat directly into our server code base, as I had literally no idea how to use it, so I ended up using some regex expressions & converting to LUA – wasn’t such a good idea –

Moveuse.dat comes with a few different events Use, MultiUse, Collision, Separation and Movement, every object, action is there. Even magic fields! Magic fields in OpenTibia are hard-coded, you have to setup the conditions on items.xml, then you have to add the item in movements.xml both onAddField and onAddTileItem, ridiculous! Too much work just for a field item!

But RealOTS is a whole completely different story, a single line to setup any field! e.g; poison field.

It seemed complicated to me to override OpenTibia (TFS) default functionality for fields and other stuff like onEquip functions and more. Fortunately for me I figured out a clean way to make use of this, of course this also meant that I removed LUA scripting functionality entirely out of the server, I like the way RealOTS is super clean with it’s data files.

Ended up making my own object class to use with moveuse.dat, this class would load moveuse rules and hold actions to execute respective calls when needed. Like a creature movement, an item using, etc …

It took me around 2 days to setup my MoveUseDatabase class within TFS and use moveuse.dat at the same time, yes this meant that I removed actions & movements folders! Only moveuse.dat for scripting, hurrah!

Having to use moveuse.dat directly also meant that I did not had to worry about a teleport or item not working because I failed miserably as a human being to convert it to LUA format.

As a game developer, it truly eases things a lot.

I am now multiple steps ahead into RealOTS perfection, the stable server core, the items, the original map with refreshable tiles, and now the actions functionality.

What do I have to do next? Players can already walk around. I need to make use of monsters!

During multiple projects at our private git server, I had made multiple conversions of RealOTS monster files to OT readable format (XML), tried different structures (Python) to make sure I was comfortable with the scripting and that I would not mess a single digit, as usual I was not pleased with the results.

Along with the MoveUseDatabase interpreter, I used the same scripting class to read Monsterraces from RealOTS (Yes, RealOTS has their own scripting system, we all know that, but they use it for every script file they have even the configuration file).

Health, experience, name, flags, attributes, spells, loot, and stock loot chances, everything is there.

Of course as usual, there are some complications in compatibility concerning certain facts of a monster file, e.g; a spell type is not the same as an OT type, this was an issue for me as I wanted to use them directly without much modification.

A physical spell would look like this:

Victim (7, 9, 0) -> Damage (1, 25, 5) : 10

7 being the range, 9 being the missile effect and 0 being the hit effect.

It’s a damaging spell, 1 being the damage type, 25 being the max hit, 5 being the minimum hit, and then 10 the chance to use the spell based on the monster strategies.

Turned it into this

Victim (7, 9, 0) -> Damage (PHYSICAL, 25, 5) : 10

That’s so much better! I can now easily adjust the spells and figure what damage type it is thanks to the reverse engineered code of RealOTS.

After some developing and changing on monsters within the server code base, I’m able to load every monster files from RealOTS (with the modifications mentioned for compatibility changes), the excitement you have when you can finally summon the races and see their spells act! I still need to do the monster behavior changes to be same as RealOTS

Even though I know that the removal of LUA is something most devs would not appreciate, but personally I dislike the mess there is found everywhere, that’s what happens once you’re used to work with RealOTS files.

Now to monster homes (That’s what they are called in CipSoft), It was always known that monster “spawns” in RealOTS was a whole completely different from OTs, but what makes it so unique? First off; there’s a single spawn for each monsterhome, whether or not it’s a single monster or multiple one, as follows:

RAT 32000 32001 7 50 3 60

Basically it would be interpreted as follows; monster race, X pos, Y pos, Z pos, home radius (max view range until disappearance), amount of monsters, regeneration time in seconds.

So e.g; a set of Amazons in Amazon Camp would only require a single line for a spawn zone, but what did CipSoft use to spawn around their monsters? Same process as for Raids; a set of random coordinates for each monster for a single monster home, but we must also pathfind our map not to spawn monsters inside other rooms their spawn home is next to.

On our first versions we actually failed miserably to search for spawn fields resulting into this:

It was as usual, reported by one of our players.

That’s not right at all, and having to code our spawn field searcher to be more accurate was a difficult task, but nothing we couldn’t solve.

Everytime RealOTS boots, monster coordinates are different everytime unless of course, it’s a single monster spawn (Black Knight for instance).

Now a few touches here and there for respective RealOTS monsters behaviour and voila.

Players can now interact with items on the map, walk around caves, explore and face monsters, what do I need next? NPCS!

Since the first public release of RealOTS NPCs the OpenTibia community has always felt the urge to use such a scripting system into their servers, it’s clean and easy to use compared to LUA & XML (just ew imo, but a lot of control too) and also that you’d only need to set the home coordinates on the NPC file, instead of the map editor.

For quite some time we kept using a NPC converter to LUA I made years ago, it did an acceptable job, but since NPCs use a scripting language, the things can become hard when it comes to complex equations, and besides that it made our code base to look ugly. Once again, proposed myself something new.

As a programmer you can tell you can’t simply use the same way you used to develop the MoveUseDatabase since it seems that NPC files have some type of lexical syntax (ability to make operations).

“yes”,topic=2,QuestValue(4)>QuestValue(5) -> “Yes you have done all the quests required for the brotherhood of the gay people!”

It killed my head to find a way to keep working on my RealOTS project without having to use LUA, tedious work and questions within multiple programming forums and none granting a solid answer on what to do, some suggested to use Boost::Spirit, but nah it’s too complicated for what CipSoft actually used.

When all of a sudden while reading through various guides on scripting languages this comes to my head “Syntax Tree” and it reminded me some of the code I saw on RealOTS pseudo code, lots and lots of nodes. In programming you develop programming languages or so scripting languages throughout a Syntax Tree or so an (Abstract Syntax Tree) that is what CipSoft used to develop their amazing NPC system wow! I finally knew what to do, but for someone who learnt programming by himself to program an AST was a hard task, but nothing that could stop me from completing my project for my own satisfaction :).

Around 2 weeks it took me to develop a working AST to use with NPC files, an incredible amount of issues and code rewrite that I had to do to make sure my code was PERFECT! (I hate ugly looking code and hard to maintain / read).

Of course, this first NPC environment system I made worked, unfortunately I had to make some changes to NPCs, because I could hardly load conditions & actions. So instead of nodes looking like this:

ADDRESS,”hello$”,! -> “Leave me alone!”, Idle,

I had to do this:

{ADDRESS,”hello$”,! -> “Leave me alone!”, Idle},

As expected, after roughfully 24 hours I changed my mind and rewrote my entire NPC environment system, yes entirely! But this time it only took me as far as 2 days to complete it, my mind already knew how to develop AST and with the help of the decompiled code I actually figured a way to load the NPCs directly without a single char edit!

On my first debug try resulting in:

That’s not right at all, but now I know my NPC is following it’s nodes respectively.

Added our according situation nodes (Address, Busy and Vanish) code handling so that I could greet our NPC.

Yes, by the time of debugging I did not check the $ process, basically it stands for “match whole word”.

Some programming sessions and tests

And after, in roughfully 1385 lines, my NPCs environment is done, RealOTS right story telling code and talk delaying, thanks for pseudo code and reverse engineering techniques.

It was hard to understand CipSoft syntax analyzer and scripting system, as their game server was coded in C 😦

By this stage we already have a fully functioning server, everything that we need to run our server and play without a single bug (All RealOTS data files & TFS server core).

To be posted:

RealOTS monster A.I & RealOTS monsters secret strategies that almost no one noticed