Jump to content

Recommended Posts

  • Forum Moderator
5 minutes ago, BadRomani said:

I added this system before. But the game was constantly crashing due to SECTREE_MANAGER. I do not recommend using it.

Actually, this is likely more of a you problem than a system problem.

Edited by Gurgarath

Gurgarath
coming soon
My Services

  • Forum Moderator
1 hour ago, BadRomani said:

Many people get this error. That's exactly my problem. ?

Post the stacktrace, steps to reproduce, that would be more interesting

  • Good 1

Gurgarath
coming soon
My Services

  • 2 weeks later...
On 9/23/2022 at 2:49 AM, Owsap said:

Fixed and improved some stuff.

4fEH6NE.gif
Go the repository!

Fixed party entry.
Rearrange ticket check.
Add quest to warp from port to village.
Added cooldown.
Increased monster spawn.


Do you want this?

I have also added the rankings like the official.
This system has already been shared here from @ Mali although you will have to adapt it.
If you would like to use my version, I would suggest a poll, https://forms.gle/zRovvNrdY6we9UrX7

Hey @ Owsap Any update on this? Can you please release the ranking system for Ship Defense?

  • Metin2 Dev 1
  • 5 months later...

https://metin2.download/picture/WnOuO2djMQs9RX7FlDdbX4qZNl5Tb2iA/.png

someone can help ? really dont understand what i miss after do all of Reposetories 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • 2 weeks later...
  • 3 months later...
  • 1 month later...
On 10/23/2022 at 3:59 PM, bekolay1 said:
1023 16:55:22017 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/back_dot.prb

1023 16:55:22034 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/box04.prb

1023 16:55:22043 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/wall_lantern.prb

1023 16:55:22044 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/vent06.prb

1023 16:55:22044 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/vent04.prb

1023 16:55:22044 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/vent03.prb

1023 16:55:22044 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/vent01.prb

1023 16:55:22045 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/ropeset03.prb

1023 16:55:22046 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/rope03.prb

1023 16:55:22046 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/right.prb

1023 16:55:22047 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/steerhandle.prb

1023 16:55:22047 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/rail_crack05.prb

1023 16:55:22048 :: CProperty::ReadFromMemory: File format error after FourCC: property/defensewave/rail_crack02.prb


error ploblem

I have the same problem, I got the property files from somewhere else, I don't get these errors but I have problems with Areadata.txt in metin2_map_defensewave_port folder 001001.
Also on the latter, in game, I don't display the terrain textures.
I added the gr2 and dds files in the zone folder

  • 1 month later...

When I add lines from the package to item_proto, mob_proto and item_names and mob_names I get an error after starting the server:

Assertion failed: (index < row->size()), function AsStringByIndex, file CsvReader.cpp, line 395.

 

3 hours ago, mlukr said:

When I add lines from the package to item_proto, mob_proto and item_names and mob_names I get an error after starting the server:

Assertion failed: (index < row->size()), function AsStringByIndex, file CsvReader.cpp, line 395.

 

I fixed this error, item_proto and mob_proto encoding must be EUC-KR.

Next problem:

1119 19:00:20443 :: Traceback (most recent call last):

1119 19:00:20443 ::   File "networkModule.py", line 247, in SetGamePhase

1119 19:00:20443 ::   File "game.py", line 112, in __init__

1119 19:00:20444 :: AttributeError
1119 19:00:20444 :: :
1119 19:00:20444 :: 'module' object has no attribute 'AllianceTargetBoard'
1119 19:00:20444 ::

  • Active Member
2 minutes ago, mlukr said:

I fixed this error, item_proto and mob_proto encoding must be EUC-KR.

Next problem:

1119 19:00:20443 :: Traceback (most recent call last):

1119 19:00:20443 ::   File "networkModule.py", line 247, in SetGamePhase

1119 19:00:20443 ::   File "game.py", line 112, in __init__

1119 19:00:20444 :: AttributeError
1119 19:00:20444 :: :
1119 19:00:20444 :: 'module' object has no attribute 'AllianceTargetBoard'
1119 19:00:20444 ::

This is the hidden content, please

  • Metin2 Dev 8
  • Good 1
  • Love 4

I don't understand whether this is right or I have a problem. If I start the dungeon and exit immediately, when I try to rejoin after a few minutes I find myself in the second wave but the ship mast has not lost life. If I stay inside the hp goes down. I could stay even an hour outside but the mast will not be destroyed

Edited by Nuzzo
  • Bot

Can't get it why people use c++ to write simple dungeons instead of lua, but hey  is cool to do things in c++ since source was released.

Duneons should be done usijng lua where possible

english_banner.gif

  • Honorable Member
12 hours ago, Punszz said:

Can't get it why people use c++ to write simple dungeons instead of lua, but hey  is cool to do things in c++ since source was released.

Duneons should be done usijng lua where possible

Although I partially agree with this. You would still need some cpp extensions in the form of functions for the like of hydra, meley and other dungeons.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Am I the only one who has encountered the ship's mast life problem?
With the various logs I've added it seems that when exiting the dungeon the enemies are still directed to the mast but the function that seems to not act correctly is this:

 

bool CShipDefenseManager::CanAttack(LPCHARACTER lpCharAttacker, LPCHARACTER lpCharVictim)
{
	if (lpCharAttacker == nullptr || lpCharVictim == nullptr)
		return false;

	if (CShipDefenseManager::Instance().IsFakeHydra(lpCharVictim->GetRaceNum()))
		return false;

	if (lpCharAttacker->IsMonster() && lpCharAttacker->IsNPC())
		if (lpCharVictim->GetRaceNum() == ShipDefense::EVNumHelper::SHIP_MAST)
			return true;

	return false;
}

It seems to be character-related. If I go out and I am in the entry map (where the safezone is), it doesn't get called.
If I move to a place where it is possible to attack monsters it is called but it checks the monsters near me and the victim results “null”

Sorry for my language😅

  • Eyes 1
  • 4 months later...
On 8/30/2022 at 4:29 PM, Owsap said:

 

Hidden Content

  • Give reaction to this post to see the hidden content.

Other Mirros

Hidden Content

  • Give reaction to this post to see the hidden content.
(GitHub) 

Hidden Content

  • Give reaction to this post to see the hidden content.
(Mega)

 

Ship Defense is a dungeon accessible only in groups (minimum 2 players, maximum 8) in which players set sail for the new continent defending the ship’s mast from increasingly stronger and more numerous monsters until they defeat all three heads of the Hydra boss. Once the mission is complete, the participants will receive some rewards (determined by chance).

TC8YhEy.png

 

Information

  Hide contents

Entry Requirements
All these requirements can be disabled.

  • The player must be present in a group.

  • Only the Group Leader can request entry to the dungeon.

  • All group members must have a Passage Ticket.

  • The maximum number of participants is 8 and the minimum is 2.

  • All group members must be on the same map.

  • The use of mounts is not allowed.

Entrance

The Group Leader requests entry from the Fisherman NPC, located at Dragon Fire Chief, so all participants will be able to access the map.
Requirements: have a Passage Ticket and do not use mounts of any kind.

Objective

The objective is to defend the mast, located on the deck of your ship, from sea monsters and the giant three-headed Hydra. A fight against the destruction of the ship’s mast: monsters attack the main sail in a targeted way to make the boat sink: it will have to be defended from waves of increasingly strong attacks. At the top right, under the mini-map, the HP bar of the ship’s Mast will appear.

Battle

The challenge will begin after the leader (only he can do it) has interacted with the NPC Rudder. All group members must be present in the ship, otherwise it will not be possible to start. From now on you will have 60 seconds to prepare before the ship sails. After these, the characters will have access to the deck of the ship and the first monsters will arrive.

Stage 1 – Hold on for 120 seconds!

The aim of the first phase is to resist the attack of the monsters for 120 seconds, defending the mast NPC. After the time has elapsed, there will be a 10 second pause before moving on to the next phase.

Stage 2 – Destroy the first head!

To complete the second phase it will be necessary to destroy the head of the Hydra, which will appear from the hole in the stern just below the rudder, while continuing to defend the Mast. In this phase, other types of monsters will appear. Defeat the first head, after 10 seconds, we will move on to the next phase. Certain monsters will attack with special attacks, the Brood of Hydra will be able to use a laser beam to heavily damage the tree, this beam can be interrupted by walking over a blue circle with an arrow. This can only be done once per every 10 seconds. Killing the Hydra Brood will spawn Wood for repair, a very weak stone type that if destroyed will drop a Wood for Repair (item) that will allow you to recharge the tree’s HP a little.

Stage 3 – Destroy the second head!

The third phase is identical to the previous one: it will end once the second head of the Hydra is destroyed. The waves of monsters will be more conspicuous and more resistant monsters will appear. More monsters will attack the Tree from a distance. At the end of the phase, after 10 seconds you will move on to the next one.

Stage 4 – Destroy the last head!

The last phase is a much more complicated version of the previous two, not only for the number, type and strength of the monsters, but also for the periodic activation of the Null Magic debuff (loss of all buffs, as for effect activated by the Ability Nullify Magic ) for 25 seconds that will be inflicted on all party members by the last head of the Hydra .
Once this last phase is completed, the reward can be obtained.

Possibility of failing

The group may fail if:

  • The Master Tree is destroyed by monsters

  • All party members choose the Surrender button after dying (in this case you will be taken to Dragon Fire Chief)

In case of Crash

It is possible to reconnect to the dungeon at any time after a crash, the character will reappear directly inside the dungeon.
You must log back into the same channel the dungeon was started in, otherwise you will be taken out to Dragon Fire Chief. It is however possible to re-enter the dungeon by reconnecting in the correct channel. In the event that all members of the party unplug / crash, it is still possible to re-enter the dungeon. Attention, even if there are no group members inside the dungeon, it will continue to function normally. For example, if all party members disconnect at the beginning of the dungeon (Phase 1), and then reconnect 3 minutes later, they will end up in Phase 2 of the dungeon, resulting in the loss of life of the Master Tree .

good <3

Demonstration

  Reveal hidden contents

??

 

On 11/24/2024 at 4:47 AM, Nuzzo said:

I don't understand whether this is right or I have a problem. If I start the dungeon and exit immediately, when I try to rejoin after a few minutes I find myself in the second wave but the ship mast has not lost life. If I stay inside the hp goes down. I could stay even an hour outside but the mast will not be destroyed

This is intended behavior. As soon as there are no PCs in a sectree area the game stops the state machine for the other entities inside. I think usually there is no reason for them to act, bcs no player observes them.

However in the special case of Ship Defense rejoining this produces the issue you are talking about.

-> Players can just abuse the missing battle state and totally skip the first time limited wave without receiving any mast damage.

When i wrote that dungeon I skipped the state machine stop for monsters that are inside of that dungeon, which solved the issue.

Feel free to test if this is also appropriate for the dungeon routine of yours.

void SECTREE::DecreasePC()
{
	LPSECTREE_LIST::iterator it_tree = m_neighbor_list.begin();

	while (it_tree != m_neighbor_list.end())
	{
		LPSECTREE tree = *it_tree++;

		if (--tree->m_iPCCount <= 0)
		{
			if (tree->m_iPCCount < 0)
			{
				sys_err("tree pc count lower than zero (value %d coord %d %d)", tree->m_iPCCount, tree->m_id.coord.x, tree->m_id.coord.y);
				tree->m_iPCCount = 0;
			}

			ENTITY_SET::iterator it_entity = tree->m_set_entity.begin();

			while (it_entity != tree->m_set_entity.end())
			{
				LPENTITY pkEnt = *(it_entity++);

				if (pkEnt->IsType(ENTITY_CHARACTER))
				{
					LPCHARACTER ch = (LPCHARACTER) pkEnt;

#ifdef ENABLE_SHIP_DEFENSE
					if (ch->IsInShipDefenseDungeon())
						continue;
#endif

					ch->StopStateMachine();
				}
			}
		}
	}
}

 

  • Good 1
  • Love 1
  • Honorable Member
14 hours ago, CHXRaupy said:

This is intended behavior. As soon as there are no PCs in a sectree area the game stops the state machine for the other entities inside. I think usually there is no reason for them to act, bcs no player observes them.

However in the special case of Ship Defense rejoining this produces the issue you are talking about.

-> Players can just abuse the missing battle state and totally skip the first time limited wave without receiving any mast damage.

When i wrote that dungeon I skipped the state machine stop for monsters that are inside of that dungeon, which solved the issue.

Feel free to test if this is also appropriate for the dungeon routine of yours.

void SECTREE::DecreasePC()
{
	LPSECTREE_LIST::iterator it_tree = m_neighbor_list.begin();

	while (it_tree != m_neighbor_list.end())
	{
		LPSECTREE tree = *it_tree++;

		if (--tree->m_iPCCount <= 0)
		{
			if (tree->m_iPCCount < 0)
			{
				sys_err("tree pc count lower than zero (value %d coord %d %d)", tree->m_iPCCount, tree->m_id.coord.x, tree->m_id.coord.y);
				tree->m_iPCCount = 0;
			}

			ENTITY_SET::iterator it_entity = tree->m_set_entity.begin();

			while (it_entity != tree->m_set_entity.end())
			{
				LPENTITY pkEnt = *(it_entity++);

				if (pkEnt->IsType(ENTITY_CHARACTER))
				{
					LPCHARACTER ch = (LPCHARACTER) pkEnt;

#ifdef ENABLE_SHIP_DEFENSE
					if (ch->IsInShipDefenseDungeon())
						continue;
#endif

					ch->StopStateMachine();
				}
			}
		}
	}
}

 

I reworked the entire dungeon some time ago after this release, and I can confirm that this is the correct solution to ensure the dungeon progresses normally, even without players in the SECTREE.

  • muscle 1
On 4/25/2025 at 5:08 AM, CHXRaupy said:

This is intended behavior. As soon as there are no PCs in a sectree area the game stops the state machine for the other entities inside. I think usually there is no reason for them to act, bcs no player observes them.

However in the special case of Ship Defense rejoining this produces the issue you are talking about.

-> Players can just abuse the missing battle state and totally skip the first time limited wave without receiving any mast damage.

When i wrote that dungeon I skipped the state machine stop for monsters that are inside of that dungeon, which solved the issue.

Feel free to test if this is also appropriate for the dungeon routine of yours.

void SECTREE::DecreasePC()
{
	LPSECTREE_LIST::iterator it_tree = m_neighbor_list.begin();

	while (it_tree != m_neighbor_list.end())
	{
		LPSECTREE tree = *it_tree++;

		if (--tree->m_iPCCount <= 0)
		{
			if (tree->m_iPCCount < 0)
			{
				sys_err("tree pc count lower than zero (value %d coord %d %d)", tree->m_iPCCount, tree->m_id.coord.x, tree->m_id.coord.y);
				tree->m_iPCCount = 0;
			}

			ENTITY_SET::iterator it_entity = tree->m_set_entity.begin();

			while (it_entity != tree->m_set_entity.end())
			{
				LPENTITY pkEnt = *(it_entity++);

				if (pkEnt->IsType(ENTITY_CHARACTER))
				{
					LPCHARACTER ch = (LPCHARACTER) pkEnt;

#ifdef ENABLE_SHIP_DEFENSE
					if (ch->IsInShipDefenseDungeon())
						continue;
#endif

					ch->StopStateMachine();
				}
			}
		}
	}
}

 

I also thought about this solution but didn't feel safe touching this function. So I opted for a timer connected to the destruction of the mast (I don't like it). I will use this method as well. Thank you!

 

Quote

CHXRaupy


One question, for “IsInShipDefenseDungeon,” did you check for all the mobs in the dungeon or did you just check the presence of the mast inside?

Edited by Nuzzo
3 minutes ago, Nuzzo said:

 


One question, for “IsInShipDefenseDungeon,” did you check for all the mobs in the dungeon or did you just check the presence of the mast inside?

#ifdef ENABLE_SHIP_DEFENSE
auto CHARACTER::IsInShipDefenseDungeon() const -> bool
{
	return m_Dungeon && m_Dungeon->GetIndex() == ConstMap::DungShipDefense;
}
#endif

I checked for the dungeon ptr on the mobs, bcs this is a very reliable identification if they are in that dungeon.

When they spawn, they immediately get the ptr.

auto CDungeon::SpawnMob(const ConstDungeon::MobSpawn* spawn, bool tryRarity) -> LPCHARACTER
{
	auto* map = CSectreeManager::instance().GetMap(m_MapIndex);
	if (!map) return nullptr;

	auto rotation = spawn->dir;
	if (!spawn->degrees)
	{
		rotation ? rotation = (spawn->dir - 1) * 45 : rotation = -1;
	}

	auto* mob = CCharacterManager::instance().SpawnMob(
		spawn->vnum, m_MapIndex, map->m_setting.baseX + spawn->x * 100, map->m_setting.baseY + spawn->y * 100, 0, spawn->motion, rotation, true, false, nullptr, "", tryRarity
	);

	if (!mob)
		return nullptr;

	mob->SetDungeon(this);

	ProcessSpawnEvent(mob);

	if (!spawn->key.empty())
		m_UniqueMobs.emplace(spawn->key, mob);

	return mob;
}

And when they die (get destroyed) it is being set to nullptr.

So you have a very solid identification method over the lifespan of the mobs if they need the state machine skip or not.

If you would check for the Mast and in a few months you dont think about it anymore and spawn one maybe on a non dungeon map, it would lead to unnecessary server load.

I guess there are also other ways you can do the check e.g. with the private map index of the mob, I think you can check which function Owsap has written for the identification of the dungeon mobs and use his one.👍

 

 

 

  • Love 1
  • 1 month later...

Good afternoon,

I have two problems, see if anyone can help:

1 - The mast's health does not appear to the player
2 - If I do not try to defend the ship, I am thrown off the map, as if I failed the dungeon, but I do not receive a failure message, or an error in the log, and if I try to enter again, it says that the dungeon has already started, and it never ends, only if I restart the server completely

  • 1 month later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.