Jump to content

Vanilla Core [latest: r71480]


Vanilla

Recommended Posts

News:

New build in work. The next builds will drop mysql libraries in favour of mariadb. You won't have to compile mariadb by yourself since I'll add a new directory called "External" which holds the mariadb libraries and includes. Next build will be distributed soon.

I also looked at the problems reported with the release build. At my pc it's working fine but some people reported core crashes. I hereby advise to reduce the optimization flags to -O3 instead of -Ofast. You can just search -Ofast in your Makefile (located in game/src) and change it to -O3. If it still crashes, you can further reduce it to -O2 but most likely that won't be needed.

Additionally I've fixed (and you can do that too) the linkflags on db. It's a minor cause but it'll end up with your db not loading the libs from /usr/local/lib32. You only have to change the lines for DTARGET and RTARGERT so it's using the right linkflags.

$(DTARGET): $(OBJ_DBG_FILES)
        @echo $(CC) $(CLINKFLAGS_DBG) $(LIBDIR) $(LIBS) -o $(DTARGET)
        @$(CC) $(CLINKFLAGS_DBG) $(LIBDIR) $(OBJ_DBG_FILES) $(LIBS) -o $(DTARGET)

$(RTARGET): $(OBJ_REL_FILES)
        @echo $(CC) $(CLINKFLAGS_REL) $(LIBDIR) $(LIBS) -o $(RTARGET)
        @$(CC) $(CLINKFLAGS_REL) $(LIBDIR) $(OBJ_REL_FILES) $(LIBS) -o $(RTARGET)

Since I'm not able to virtualize and compile (thanks to a beta bios update yay) the next release will have pre-compiled binaries too! :)

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

vor 10 Stunden schrieb MORTE:

Erro fix:

in config.h


extern bool sequenche_check;

to


extern bool sequence_check;

 

Vanilla

 

Did you see if disabling sequence_check generates any errors?

It's one of the older options, thanks for pointing out the typo. I've fixed it in the next version. I've also tested it once I implemented the option. I highly recommend not to disable the sequence check but sometimes it can cause trouble and since the sequence table can easily be read from the binaries it's advisable to be disabled in some rare occasions. Disabling the sequence could lead to other binaries be able to connect (if you have for example standard encryption passphrases). So yep, it's best to leave it on but if you disable it, the sequence will automagically be accepted, no matter if it's wrong or right. That's all the disabling does, the packets are still send to max out compatibility. I dunno if the client binary does care about the sequences or not, that's what I didn't look into since I'm not modding the client.

  • Love 1

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

7 hours ago, Vanilla said:

It's one of the older options, thanks for pointing out the typo. I've fixed it in the next version. I've also tested it once I implemented the option. I highly recommend not to disable the sequence check but sometimes it can cause trouble and since the sequence table can easily be read from the binaries it's advisable to be disabled in some rare occasions. Disabling the sequence could lead to other binaries be able to connect (if you have for example standard encryption passphrases). So yep, it's best to leave it on but if you disable it, the sequence will automagically be accepted, no matter if it's wrong or right. That's all the disabling does, the packets are still send to max out compatibility. I dunno if the client binary does care about the sequences or not, that's what I didn't look into since I'm not modding the client.

Thanked for attention :)

 

 

Link to comment
Share on other sites

vor 9 Stunden schrieb HisaoShou:

What are the features of this core?  Like... pet system, mounts, so on...

And what client do I need for this to run with full actual features?

Everything mentioned in here: 

 

and everything I mentioned in this thread. There ar lots of source changes, some minor and some major. It has a unique system, new quest triggers, a mysql class for quests, new quest functions and is fully customizable, not only via CONFIG and txt's but also via source since it's fully open source.

 

You can use very client compatible with r34k and above. No need to adapt anything, vanilla core is a drop-in replacement for your game and db file being backward-compatible with official server setups.

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

Acum 5 ore, Vanilla a spus:

and everything I mentioned in this thread. There ar lots of source changes, some minor and some major. It has a unique system, new quest triggers, a mysql class for quests, new quest functions and is fully customizable, not only via CONFIG and txt's but also via source since it's fully open source.

 

You can use very client compatible with r34k and above. No need to adapt anything, vanilla core is a drop-in replacement for your game and db file being backward-compatible with official server setups.

So... this is NOT a serverfile, but a core? Like... those cores from Ch1, Ch2, and so on...?

And this works on any serverfile over 2010? 

 

How do I install this? 

And why the download link is not working (v2.4.1) ? - nvm. I looked on the wrong topic

Link to comment
Share on other sites

Acum 4 ore, Galet a spus:

You can find sources, db file and game file, you just have to replace the game and db (and tweak your game like adding the stuff you cant in CONFIG and editing Sql Tables) then it'll be done :D

 

 

It would be really useful if there would be an tutorial doing all this. 

Like adding stuff in CONFIG and Sql Tables

Link to comment
Share on other sites

News about the update - yep, I have some. I'm currently figuring out what's going on with the newer mysql libs. I'll tell you a long story and a tl;dr for everyone who is lazy to read.

It's a really strange occurance. The game and db boot fine but I tried to upgrade to more recent mysql libraries. As soon as I'm using the new libraries, the connection values (host, etc.) have really weird characters. It looks like an encoding issue to me but it really does not make any sense since the characters occur even when I print debug messages long before any function from the library is called. I therefore decided to fix a warning that's been bugged me for a while and go for the all-utf8 stuff. Now every source and header file is converted into utf-8 with all the characters still remaining (except for one occurance where I had to short a function in empire_text_convert.cpp. So the core will still be stable but the conversion may need further testing, but I guess it'd work like before). The error with the weird characters still appeared but only at the first boot with the changes. Every new boot now seems to work fine, game and db connects perfectly. But since the error had occured at least once I'm not ready to ship.

tl;dr: Weird bug with libmysqlclient that seems to be fixed, but needs further testing, then I'll ship

 

For editing CONFIG and all the stuff you need to visit one of the basic tutorials about server configuring. You need to understand the parts of your serverfiles. You can think of the gamefile as the kernel of your server (though of course It's not a kernel, just for your imagination). While the serverfiles in it's whole is the system (with using scripts like quests and all that stuff) the core itself is the first thing your client will come in touch (of course only after the OS, etc..) when connecting to the server. It delegates and of course does the main job. That's why it's called a core. The dbcache does support the core and handles all the mysql stuff and does the caching job. Vanilla is NOT a serverfiles replacement, it's a core-replacement. It also is NOT a client modification at all. It only affects the core and is backward compatible with serverfiles and clients beginning from r34k (recommended: r40k). As soon as you understand the parts of your serverfiles and get a view on it's structure you're also able to adjust the CONFIG to your needs and fully unlock the possibilites vanilla core holds. But even without utilizing the CONFIG files you're having a lot of fixes and stuff that's not in the 40k source.

  • Love 4

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

vor 9 Stunden schrieb MORTE:

Vanilla 

Any ideas for fixing this error? (I do not have shop offline) 

-sPzMJKORYmSGCNmCEW0ZQ.png

This is a thread for the vanilla source, so please send a PM if you're interested in help with other topics. I do not have your source and therefore I am unable to help you with this error unless you give me a proper bug report.

Please refrain from error reports which are not related to the vanilla source published here. If you modify anything on the source I can't help you with this especially since people will think the source would be buggy. Please send a Pm for such concerns.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

Hello everybody!

My channel cores randomly crash with this error.

#0  0x081d7a53 in quest::CQuestManager::CancelServerTimers ()
#1  0x08104e07 in CDungeonManager::Destroy ()
#2  0x08104bc9 in dungeon_dead_event ()
#3  0x081587eb in event_process ()
#4  0x08172c2c in heartbeat ()
#5  0x08174b73 in idle ()
#6  0x08173655 in main ()

Any Ideas?

Link to comment
Share on other sites

  • Bronze
Am 4.7.2017 um 16:04 schrieb .NyanCat:

Hello everybody!

My channel cores randomly crash with this error.


#0  0x081d7a53 in quest::CQuestManager::CancelServerTimers ()
#1  0x08104e07 in CDungeonManager::Destroy ()
#2  0x08104bc9 in dungeon_dead_event ()
#3  0x081587eb in event_process ()
#4  0x08172c2c in heartbeat ()
#5  0x08174b73 in idle ()
#6  0x08173655 in main ()

Any Ideas?

Try to replace the CQuestManager::CancelServerTimers method in questmanager.cpp with this one:

	void CQuestManager::CancelServerTimers(DWORD arg)
	{
		for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/)
		{
			if (it->first.second != arg)
			{
				++it;
			}
			else
			{
				auto event = it->second;
				event_cancel(&event);
				m_mapServerTimer.erase(it++);
			}
		}
	}

 

Regards

Link to comment
Share on other sites

vor 3 Stunden schrieb Yiv:

Try to replace the CQuestManager::CancelServerTimers method in questmanager.cpp with this one:


	void CQuestManager::CancelServerTimers(DWORD arg)
	{
		for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/)
		{
			if (it->first.second != arg)
			{
				++it;
			}
			else
			{
				auto event = it->second;
				event_cancel(&event);
				m_mapServerTimer.erase(it++);
			}
		}
	}

 

Regards

Hey thanks for your help!

Do you think that i can implement it right into the live system?
The problem is that it only occures on the live server. The test server does not have this problems. The files are 1:1 the same except the database (much more players on live)

I cant figure out the excact problem are these timers saved somewhere in the database?

Greetings and thanks for your help!

Link to comment
Share on other sites

 

vor 18 Stunden schrieb .NyanCat:

Hey thanks for your help!

Do you think that i can implement it right into the live system?
The problem is that it only occures on the live server. The test server does not have this problems. The files are 1:1 the same except the database (much more players on live)

I cant figure out the excact problem are these timers saved somewhere in the database?

Greetings and thanks for your help!

Yes you should be able just push it to a live server, as it just cleans&fixes code.
Here another example, that we had running on Zentoria, as we were struggling with similar problems:

	void CQuestManager::CancelServerTimers(uint32_t arg)
	{
		auto it = m_mapServerTimer.begin();
		while (it != m_mapServerTimer.end()) {
			if (it->first.second == arg) {
				auto event = it->second;
				event_cancel(&event);
				it = m_mapServerTimer.erase(it);
			}
			else
				++it;
		}
	}

map::erase invalidates the current iterator, but returns the one of the next element in the container.

  • Love 2
Link to comment
Share on other sites

  • Bronze
vor 20 Stunden schrieb .NyanCat:

Hey thanks for your help!

Do you think that i can implement it right into the live system?
The problem is that it only occures on the live server. The test server does not have this problems. The files are 1:1 the same except the database (much more players on live)

I cant figure out the excact problem are these timers saved somewhere in the database?

Greetings and thanks for your help!

Both solutions should work fine. I think the solution posted by Socialized using the returned iterator by the erase method should be better. I at least would change my code posted above to this:

	void CQuestManager::CancelServerTimers(DWORD arg)
	{
		for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/)
		{
			if (it->first.second != arg)
			{
				++it;
			}
			else
			{
				auto event = it->second;
				event_cancel(&event);
				it = m_mapServerTimer.erase(it);
			}
		}
	}

 

Regards

  • Love 2
Link to comment
Share on other sites

vor einer Stunde schrieb Yiv:

Both solutions should work fine. I think the solution posted by Socialized using the returned iterator by the erase method should be better. I at least would change my code posted above to this:

 

Regards

 

vor 3 Stunden schrieb Socialized:

 

Yes you should be able just push it to a live server, as it just cleans&fixes code.
Here another example, that we had running on Zentoria, as we were struggling with similar problems:

map::erase invalidates the current iterator, but returns the one of the next element in the container.

Wow thanks guys for your help!

@Yiv: With your first solution the core crashed after about 22 hours. But without generating the .core file so i cant backtrace the error...

@Socialized Im gonna try the modification now and tell you if the crashes are gone.

Thanks again!

Link to comment
Share on other sites

Announcements



  • Similar Content

  • Activity

    1. 0

      Moving server from FreeBSD 11.2 to 13.2 - lib needed

    2. 0

      I just implemented some costumes and they are not visible

    3. 0

      Skill Tree Problem

    4. 97

      Ulthar SF V2 (TMP4 Base)

    5. 5

      Client Crashes through Offline Shop (Ikarus)

    6. 5

      VIVY-WORLD2 - FARM TO THE TOP

    7. 0

      ToolTip Bug?

    8. 0

      Skill tree build erorr

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.