RPG Campaign:"Castle of evil spirit" and "add_creature_pack"

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

User avatar
IIIO_METAL
Posts: 152
Joined: January 18th, 2017, 5:03 pm
Location: japan

Re: RPG Campaign:"Castle of evil spirit" and "add_creature_pack"

Post by IIIO_METAL » March 11th, 2019, 4:34 am

octalot, Thank you for the nice info!
And I think I do not understand most of the patch format. Anyway, I will try out the code you wrote. Currently, I do not even know what kind of question I should ask, so I need to study to that level myself. :oops:
Creator of "Mountain Witch" & "Castle of evil spirit"

User avatar
octalot
Code Contributor
Posts: 329
Joined: July 17th, 2010, 7:40 pm

Re: RPG Campaign:"Castle of evil spirit" and "add_creature_pack"

Post by octalot » March 11th, 2019, 11:54 pm

This only changes two files, so it's easy to describe the changes without using patch format.

In _main.cfg, add these two lines between [/language] and #ifhave ~add-ons/UMC_Music_Book_01/_main.cfg

Code: Select all

	{COES_ALWAYS_ACTIV_EVENT_IMPLEMENTATION}
	{COES_DUNGEON_ACTIV_EVENT_SIDELESS_IMPLEMENTATION}
In Scenario_Utils.cfg, delete every line before #define EVENT_ACTIVATION_STEP, and put this in instead:

Code: Select all

#textdomain wesnoth-Castle_of_evil_spirit

####################### 各シナリオに常駐させるイベント
#define COES_ALWAYS_ACTIV_EVENT SIDE
	[load_resource]
		id=coes_always_activ_event
	[/load_resource]
#enddef

# This will only be instanciated once, from _main.cfg, but it needs all of the
# macros that it uses to be defined before it is instanciated.
#define COES_ALWAYS_ACTIV_EVENT_IMPLEMENTATION
	[resource]
		id=coes_always_activ_event
		{EVENT_ACTIVATION_STEP}
		{CONFIRM_UNIT}
	[/resource]
#enddef

####################### ダンジョン内で常駐させるイベント
#define COES_DUNGEON_ACTIV_EVENT SIDE
	{DROP_JUDGMENT {SIDE} (Jelly_Monster,Jelly_Monster_1,Jelly_Monster_2,Jelly_Monster_3,Jelly_Monster_4,Jelly_Monster_5)}
	[load_resource]
		id=coes_dungeon_activ_event_sideless
	[/load_resource]
#enddef

# This will only be instanciated once, from _main.cfg, but it needs all of the
# macros that it uses to be defined before it is instanciated.
#define COES_DUNGEON_ACTIV_EVENT_SIDELESS_IMPLEMENTATION
	[resource]
		id=coes_dungeon_activ_event_sideless
		{PICK_EVENT 1}
		{LAMP_ACTIV}
		# {GETLOST_ITEM poison}
		# {GETLOST_ITEM Anesthetic}
		# {GETLOST_ITEM Deadly_poison}
		{DIE_PLAYER_UNIT}
		{ACTION_AGAIN}
	[/resource]
#enddef

User avatar
IIIO_METAL
Posts: 152
Joined: January 18th, 2017, 5:03 pm
Location: japan

Re: RPG Campaign:"Castle of evil spirit" and "add_creature_pack"

Post by IIIO_METAL » March 12th, 2019, 12:37 pm

octalot, thanks for the polite commentary! Now, I understand the basic use of [resources].
The fact that the memory size used by the add-on was large was a problem to be solved, so it was very helpful.
Creator of "Mountain Witch" & "Castle of evil spirit"

Post Reply