Jump to content
  • 0

Changing Alchemist Marine Sphere Behavior


Sylfeyn

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  7
  • Reputation:   2
  • Joined:  03/10/25
  • Last Seen:  

I'm trying to make the summoned Marine Sphere immediately cast Self Destruction upon spawning. What's the simplest way to achieve this, without affecting naturally spawned Marine Spheres?

Edited by Sylfeyn
additional info
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  7
  • Reputation:   2
  • Joined:  03/10/25
  • Last Seen:  

Okay the simplest form was to create a separate mob based on Marine Sphere and edit the relevant source files to use its mob id instead of the original marine sphere, then configure the skill in mob_skill_db.txt with condition onspawn

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  189
  • Reputation:   7
  • Joined:  10/22/18
  • Last Seen:  

22 hours ago, Sylfeyn said:

Okay the simplest form was to create a separate mob based on Marine Sphere and edit the relevant source files to use its mob id instead of the original marine sphere, then configure the skill in mob_skill_db.txt with condition onspawn

which source files to edit to use different mob id?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  7
  • Reputation:   2
  • Joined:  03/10/25
  • Last Seen:  

Posted (edited)
1 hour ago, Frost Diver said:

which source files to edit to use different mob id?

I created a mob with id 30000 and AegieName G_MARINE_SPHERE in db/import/mob_db.yml all other stats copied from the original
Then I added this to db/import/mob_avail.yml to assign it a sprite:
 

Body:
  - Mob: G_MARINE_SPHERE
    Sprite: MARINE_SPHERE

In db/import/mob_skill_db.txt I added:
30000,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,3500,0,yes,self,onspawn,,,,,,,,

In skill.cpp:
 

case AM_SPHEREMINE:
case AM_CANNIBALIZE:
	{
		int32 summons[5] = { MOBID_G_MANDRAGORA, MOBID_G_HYDRA, MOBID_G_FLORA, MOBID_G_PARASITE, MOBID_G_GEOGRAPHER };
		int32 class_ = skill_id==AM_SPHEREMINE?MOBID_MARINE_SPHERE:summons[skill_lv-1];
		enum mob_ai ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
		struct mob_data *md;

I changed MOBID_MARINE_SPHERE to MOBID_G_MARINE_SPHERE.


Finally in mob.hpp:
 

enum MOBID {
	MOBID_PORING			= 1002,
	MOBID_RED_PLANT			= 1078,
	MOBID_BLUE_PLANT,
	MOBID_GREEN_PLANT,
	MOBID_YELLOW_PLANT,
	MOBID_WHITE_PLANT,
	MOBID_SHINING_PLANT,
	MOBID_BLACK_MUSHROOM	= 1084,
	MOBID_MARINE_SPHERE		= 1142,
	MOBID_EMPERIUM			= 1288,
	MOBID_G_PARASITE		= 1555,
	MOBID_G_FLORA			= 1575,
	MOBID_G_HYDRA			= 1579,
	MOBID_G_MANDRAGORA		= 1589,
	MOBID_G_GEOGRAPHER		= 1590,	
	MOBID_GUARDIAN_STONE1	= 1907,
	MOBID_GUARDIAN_STONE2,
	MOBID_SILVERSNIPER		= 2042,
	MOBID_MAGICDECOY_FIRE,
	MOBID_MAGICDECOY_WATER,
	MOBID_MAGICDECOY_EARTH,
	MOBID_MAGICDECOY_WIND,
	MOBID_ZANZOU			= 2308,
	MOBID_S_HORNET			= 2158,
	MOBID_S_GIANT_HORNET,
	MOBID_S_LUCIOLA_VESPA,
	MOBID_GUILD_SKILL_FLAG	= 20269,
	MOBID_ABR_BATTLE_WARIOR = 20834,
	MOBID_ABR_DUAL_CANNON,
	MOBID_ABR_MOTHER_NET,
	MOBID_ABR_INFINITY,
	MOBID_BIONIC_WOODENWARRIOR = 20848,
	MOBID_BIONIC_WOODEN_FAIRY,
	MOBID_BIONIC_CREEPER,
	MOBID_BIONIC_HELLTREE,
};

I added MOBID_G_MARINE_SPHERE    = 30000, into this enum

I think that's it.

Edited by Sylfeyn
mob.hpp instead of skill.hpp
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  189
  • Reputation:   7
  • Joined:  10/22/18
  • Last Seen:  

7 hours ago, Sylfeyn said:

I created a mob with id 30000 and AegieName G_MARINE_SPHERE in db/import/mob_db.yml all other stats copied from the original
Then I added this to db/import/mob_avail.yml to assign it a sprite:
 

Body:
  - Mob: G_MARINE_SPHERE
    Sprite: MARINE_SPHERE

In db/import/mob_skill_db.txt I added:
30000,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,3500,0,yes,self,onspawn,,,,,,,,

In skill.cpp:
 

case AM_SPHEREMINE:
case AM_CANNIBALIZE:
	{
		int32 summons[5] = { MOBID_G_MANDRAGORA, MOBID_G_HYDRA, MOBID_G_FLORA, MOBID_G_PARASITE, MOBID_G_GEOGRAPHER };
		int32 class_ = skill_id==AM_SPHEREMINE?MOBID_MARINE_SPHERE:summons[skill_lv-1];
		enum mob_ai ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
		struct mob_data *md;

I changed MOBID_MARINE_SPHERE to MOBID_G_MARINE_SPHERE.


Finally in mob.hpp:
 

enum MOBID {
	MOBID_PORING			= 1002,
	MOBID_RED_PLANT			= 1078,
	MOBID_BLUE_PLANT,
	MOBID_GREEN_PLANT,
	MOBID_YELLOW_PLANT,
	MOBID_WHITE_PLANT,
	MOBID_SHINING_PLANT,
	MOBID_BLACK_MUSHROOM	= 1084,
	MOBID_MARINE_SPHERE		= 1142,
	MOBID_EMPERIUM			= 1288,
	MOBID_G_PARASITE		= 1555,
	MOBID_G_FLORA			= 1575,
	MOBID_G_HYDRA			= 1579,
	MOBID_G_MANDRAGORA		= 1589,
	MOBID_G_GEOGRAPHER		= 1590,	
	MOBID_GUARDIAN_STONE1	= 1907,
	MOBID_GUARDIAN_STONE2,
	MOBID_SILVERSNIPER		= 2042,
	MOBID_MAGICDECOY_FIRE,
	MOBID_MAGICDECOY_WATER,
	MOBID_MAGICDECOY_EARTH,
	MOBID_MAGICDECOY_WIND,
	MOBID_ZANZOU			= 2308,
	MOBID_S_HORNET			= 2158,
	MOBID_S_GIANT_HORNET,
	MOBID_S_LUCIOLA_VESPA,
	MOBID_GUILD_SKILL_FLAG	= 20269,
	MOBID_ABR_BATTLE_WARIOR = 20834,
	MOBID_ABR_DUAL_CANNON,
	MOBID_ABR_MOTHER_NET,
	MOBID_ABR_INFINITY,
	MOBID_BIONIC_WOODENWARRIOR = 20848,
	MOBID_BIONIC_WOODEN_FAIRY,
	MOBID_BIONIC_CREEPER,
	MOBID_BIONIC_HELLTREE,
};

I added MOBID_G_MARINE_SPHERE    = 30000, into this enum

I think that's it.

ahh no wonder i got error. i didn't modify the mob.hpp file. thanks mate. but, 1 problem is, onspawn seems not working. when i spawned, it didn't cast the self destruction immediately. when i hit then only it will cast the skill. did yours working?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.05
  • Content Count:  7
  • Reputation:   2
  • Joined:  03/10/25
  • Last Seen:  

Yeah, mine is working.
Check your db/import/mob_skill_db.txt though and make sure you have a blank newline after the 30000,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,3500,0,yes,self,onspawn,,,,,,,, line
I remember the first time I saw an error in one of the servers when loading that file because it didn't count the correct number of arguments. Adding a new line made it work correctly.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  189
  • Reputation:   7
  • Joined:  10/22/18
  • Last Seen:  

On 3/23/2025 at 6:50 PM, Sylfeyn said:

Yeah, mine is working.
Check your db/import/mob_skill_db.txt though and make sure you have a blank newline after the 30000,Marine Sphere@NPC_SELFDESTRUCTION,idle,173,1,10000,3500,0,yes,self,onspawn,,,,,,,, line
I remember the first time I saw an error in one of the servers when loading that file because it didn't count the correct number of arguments. Adding a new line made it work correctly.

yup, i did create a blank newline in the mob_skill_db.txt. no errors in the emulator. but somehow, i managed to make it work after recompile it again. weird, but got mine working now. thanks mate for the guide ^_^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...