I want to understand

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

I want to understand

Post by Rodrom »

Hello, another Wesnoth fan who decided to post. This project became something that I am very passionate about. From what I can tell the scenario and multiplayer era I've worked on so far is mediocre at best. Eventually I should improve, so that doesn't bother me too much. What makes me upset is the seasonal or "elemental" magic system that my scenario relies on to organize the battle system. The idea is that someone's special attack would trigger a fire event that changed the "time" schedule. This second schedule would trigger a series of macros, resulting in raised or lowered stats. For example, the new schedule could make pierce attacks stronger and blade attacks weaker, for a temporary hazard for the Drake faction. Is this a good idea? Whether or not it's a good idea, I want to know to chain macros and fire events properly, without any compounded macros.

Here is the some of what I have so far. I'm hoping I can do as much as possible on my own.

Code: Select all

#replace_schedule fire_event borrowed from saving elensafar campaign


[event]
	name=replace_schedule
	first_time_only=no

        [switch]
			(arcana[y].type)=x
            variable=current_time
            [case]
                value=0
                [replace_schedule]
                    $arcana[x].schedule
					current_time=0
                [/replace_schedule]
            [/case]
            [case]
                value=1
                [replace_schedule]
                    $arcana[x].schedule
					current_time=1
                [/replace_schedule]
            [/case]
            [case]
                value=2
                [replace_schedule]
                    $arcana[x].schedule
					current_time=2
                [/replace_schedule]
            [/case]
            [case]
                value=3
                [replace_schedule]
                    $arcana[x].schedule
					current_time=3
                [/replace_schedule]
            [/case]
            [case]
                value=4
                [replace_schedule]
                    $arcana[x].schedule
					current_time=4
                [/replace_schedule]
            [/case]
            [case]
				value=5
                [replace_schedule]
                    $arcana[x].schedule
					current_time=5
                [/replace_schedule]
            [/case]
        [/switch]
[/event]

[event]
	name=prestart

	[fire_event]
		name=replace_schedule
	[/fire_event]
[/event]
	

[event]
	name=new turn
	first_time_only=no

	[store_time_of_day]
		variable=temp
	[/store_time_of_day]

	{VARIABLE_OP time to_variable temp.id}

	{VARIABLE turn_counter $turn_number}
	{VARIABLE_OP turn_counter modulo 6}

	[if]
		{VARIABLE_CONDITIONAL turn_counter equals 0}
		[then]
			[fire_event]
				name=replace_schedule
			[/fire_event]
		[/then]
	[/if]
	{CLEAR_VARIABLE turn_counter,temp}
[/event]

[event]
	name=victory

	[store_time_of_day]
		variable=temp
	[/store_time_of_day]

	{VARIABLE_OP time to_variable temp.id}
	{CLEAR_VARIABLE temp}
[/event]


#define ACTIVATE_ARCANA

	[event]
		name=attackerhits
		first_time_only=no	
			[if]
				[filter]
					arcana_unlock=yes
				[/filter]
				[then]								
					[replace_schedule]
							$arcana[x].schedule
					[/replace_schedule]
					[else]
						[message]
							speaker=narrator
							image="wesnoth-icon.png"
							message= _ "Arcana failed"
						[/message]
					[/else]
				[/then]
			[/if]
	[/event]
	
#endif
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: I want to understand

Post by zookeeper »

Firstly, when you don't yet know what you're doing, you can't write that much code without testing it. Whenever you decide to try to run that code, you'll run into an endless supply of outright syntax errors or things just not working as intended and it's going to take forever to figure everything out, as opposed to testing often and iterating on it step by step, making sure that you're getting every individual step right before you take the next one.

Secondly...
Rodrom wrote:For example, the new schedule could make pierce attacks stronger and blade attacks weaker, for a temporary hazard for the Drake faction.
That's very complicated to do properly. You can't just make a schedule which says "pierce is stronger", you have to do it manually by writing events which modify every unit which comes to existence into having modified resistances or into having weapon specials which modify damage output depending on the schedule. Possible, yes (or at least I think so), but definitely tricky to get right.
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

zookeeper wrote:... testing often and iterating on it step by step, making sure that you're getting every individual step right before you take the next one.
I had read similar advice with regards to debugging entire scenarios. It stands to reason I should be doing the same thing with macro fragments and fire events. This is common sense, but everyone needs that sometimes. Thank you, I have a lot more to do still but I'm less confused on how to proceed now.

zookeeper wrote:You can't just make a schedule which says "pierce is stronger", you have to do it manually by writing events which modify every unit...
I knew this before but it's good to point out, it's a fact important enough to want us to restate. Just so we're clear, this is the question I was trying to ask. This is the central purpose of this thread.

I've been trying to make this "3-5 option [schedule replace]-triggered stat modifier" for weeks now and finally reached a point where I couldn't grasp the logic so easily from the guides.

zookeeper wrote:...definitely tricky to get right.
Yes, I wholeheartedly agree. This may sound perverse, but it's the fact that no one implemented this game mechanic yet that made me want to try it.

After playing Wesnoth for a few months, I saw many alternative multiplayer eras, but few had more strategic incentives to balance themselves than "Default" and "Default + Khalifate" already did. This was the best(most fun?) thing I could come up with to increase the amount of legal positions in this 2D strategy game.


Futhermore, Is it alright if I keep posting questions in this thread? We obviously can't have extra topics cluttering a subforum, but some forums are touchy about posting multiple times in the same thread, even if they aren't double posting.
User avatar
Paulomat4
Moderator Emeritus
Posts: 730
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: I want to understand

Post by Paulomat4 »

Futhermore, Is it alright if I keep posting questions in this thread? We obviously can't have extra topics cluttering a subforum, but some forums are touchy about posting multiple times in the same thread, even if they aren't double posting.
double posting is okay and even encouraged when it comes to wml error threads :)
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

Okay, so after last time I more or less had to tear up all my code and start over. Now that I'm actually debugging with the code as I write it(I know), I can better see what
syntax is acceptable and which is not. For now I'm trying out simpler code that merely adjusts the tint instead of using the [time] tag. Basically the idea is that the code notices the blue tint I trigger, placing a tag in every unit on the map, then applying a yet-to-be-made fire event based on whether the unit is suppose to benefit from, suffer from, or ignore the elemental ice themed-stat modifier that the color change is supposed to represent. I'm stuck and not sure where to go from here. I really thought I'd make more progress by now. It runs in Wesnoth and triggers the color change but not much else.

Code: Select all

[event]
	name=moveto
	
	[filter]
		x,y=3,21
	[/filter]
		[color_adjust]
			red="-72"
			green="-16"
			blue="-32"
		[/color_adjust]
					[event]
					name=color_change
					first_time_only=no
							[if]
								[filter_wml]
									[variables]
										red="-72"
										green="-16"
										blue="-32"
									[/variables]
								[/filter_wml]
								[then]
									[insert_tag]
										arcana_field=polar
									[/insert_tag]
								[/then]
							[/if]
					[/event]
[/event]

[event]
    name=variable
    id=TLOBH_arcana_polar_day
    first_time_only=no
		[variable]
			arcana_field=polar
		[/variable]
    [store_unit]
        [filter]
			[variable]
				variable=arcana
			[/variable]
		[/filter]
		[and]
			[filter_wml]
				[variables]
					arcana=winter
				[/variables]
			[/filter_wml]
			[or]
				[filter_wml]
					[variables]
						arcana=summer
					[/variables]
				[/filter_wml]
			[/or]
		[/and]
        variable=arcana_polar_temp
    [/store_unit]
    {FOREACH arcana_polar_temp i}
            [variable]
                name=arcana_polar_temp[$i].variables.arcana
                equals=$winter,summer
            [/variable]

    {NEXT i}
    {CLEAR_VARIABLE arcana_polar_temp}
[/event]
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: I want to understand

Post by Ravana »

Starting with beginning of control flow then.

Code: Select all

                        [filter_wml]
                           [variables]
                              red="-72"
                              green="-16"
                              blue="-32"
                           [/variables]
                        [/filter_wml]
This looks suspicious, [filter_wml] is used inside unit filter.

Code: Select all

               [event]
               name=color_change
Events with custom names you need to manually fire.

Code: Select all

                           [insert_tag]
                              arcana_field=polar
                           [/insert_tag]
insert_tag is one of most complicated parts of wml, without complete understanding of variables it is difficult to use.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: I want to understand

Post by zookeeper »

Almost nothing in your code makes sense. It's not just individual mistakes but also a lack of understanding of how the control flow in general works, so it's impossible to give a concise answer to what's wrong with it.
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: I want to understand

Post by The_Gnat »

Hello, i like the idea you have. From what you have posted this is what i understand you want to do:

- create a event that fires on a special weapon
- change the schedule on a fired event
- change units resistances/damage depending on the time of day

I would suggest that you attempt to implement each one of these seperately. You seem to already being doing this, however i would suggest you attempt to complete the easiest goals first, in this way you will understand wml better by the time you write the more complex code.

Most likely the easiest thing to do would fire an event on a special weapon and i suggest you attempt to do that first.

Hopefully this is helpful! (and you definitely should not give up on this project because it is a very good idea! :D )
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

Almost nothing in your code makes sense. It's not just individual mistakes but also a lack of understanding of how the control flow in general works, so it's impossible to give a concise answer to what's wrong with it.
Harsh but reasonable. This requires a lot more experience and attention to detail than editing unit/scenario files, so I'll just have to be persistent.
Hello, i like the idea you have. From what you have posted this is what i understand you want to do:

- create a event that fires on a special weapon
- change the schedule on a fired event
- change units resistances/damage depending on the time of day
Yes.
I would suggest that you attempt to implement each one of these seperately. You seem to already being doing this, however i would suggest you attempt to complete the easiest goals first, in this way you will understand wml better by the time you write the more complex code.

Most likely the easiest thing to do would fire an event on a special weapon and i suggest you attempt to do that first.
Hopefully this is helpful! (and you definitely should not give up on this project because it is a very good idea! :D )
Sounds like a plan to me. Thank you for the kind words.
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

Code: Select all




#define WEAPON_SPECIAL_ARCANA_ACTIVATE_N
    [arcana_activate_n]
        id=TLOBH_arcana_activate_n
        name= _ "arcana activate"
        name_inactive=_ "inactive activate"
        description= _ "Changes the schedule based on the nature of the attacking unit, and may change stats as well."
        description_inactive=_ "This attack changes the unit's surroundings."
    [/arcana_activate_n] # wmlxgettext: [specials]
[/specials] # wmlxgettext: [attack]
[/attack]
[event]
    name=attacker hits
    first_time_only=no
		[if]
			[filter_attacker]
				 side=$side_number
					[filter_wml]
						[status]
							neutral_arcana=yes
						[/status]
					[/filter_wml]
			[/filter_attacker]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=3
					  {AFTERNOON}
					[/time_area]
						{BASIC_SIGNAL}
				[/then]
		[/if]
[/event]
[+attack]
    [+specials]
        # wmlxgettext: [/specials]
        # wmlxgettext: [/attack]

#enddef



#define WEAPON_SPECIAL_ARCANA_ACTIVATE_P
    [arcana_activate_p]
        id=TLOBH_arcana_activate_p
        name= _ "arcana activate"
        name_inactive=_ "inactive activate"
        description= _ "Changes the schedule based on the nature of the attacking unit, and may change stats as well."
        description_inactive=_ "This attack changes the unit's surroundings."
    [/arcana_activate_p] # wmlxgettext: [specials]
[/specials] # wmlxgettext: [attack]
[/attack]

[event]
    name=attacker hits
    first_time_only=no
		[if]
			[filter_attacker]
				 side=$side_number
					[filter_wml]
						[status]
							winter_arcana=yes
						[/status]
					[/filter_wml]
			[/filter_attacker]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=3
					  {POLAR_AFTERNOON}
					[/time_area]
						{POLAR_SIGNAL}
				[/then]
		[/if]
[/event]
[+attack]
    [+specials]
        # wmlxgettext: [/specials]
        # wmlxgettext: [/attack]
		
#enddef



#define WEAPON_SPECIAL_ARCANA_ACTIVATE_S
    [arcana_activate_s]
        id=TLOBH_arcana_activate_s
        name= _ "arcana activate"
        name_inactive=_ "inactive activate"
        description= _ "Changes the schedule based on the nature of the attacking unit, and may change stats as well."
        description_inactive=_ "This attack changes the unit's surroundings."
    [/arcana_activate_s] # wmlxgettext: [specials]
[/specials] # wmlxgettext: [attack]
[/attack]

[event]
    name=attacker hits
    first_time_only=no
		[if]
			[filter_attacker]
				 side=$side_number
					[filter_wml]
						[status]
							summer_arcana=yes
						[/status]
					[/filter_wml]
			[/filter_attacker]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=3
					  {SOLAR_AFTERNOON}
					[/time_area]
						{SOLAR_SIGNAL}
				[/then]
		[/if]

[/event]

[+attack]
    [+specials]
        # wmlxgettext: [/specials]
        # wmlxgettext: [/attack]
		
#enddef

This is a basic idea

The SIGNAL macros just represent message tags,

The alternate schedules are same as default, but with the png icons and the basic color settings both altered to either (-96,-16,0) or (0,0,-92) so the new time areas are easy to notice.

3/31/17 EDIT:

These are the three macros I would use to create time areas. I have three questions.


1}Currently, the macros interfere with each other. No matter which one my units use, all three are activated at the same time. The fire-themed special will get replaced by the neutral one unless the neutral special is deactivated. The cold-themed weapon is overwritten by the fire-themed special and overwritten a second time by the neutral one. The fire-themed special will work if the neutral special is disabled, but it then overwrites the cold special in turn. Before I lost it, I had a weapon macro that changed the entire schedule but where the fire themed schedule was still overwriting the cold-themed one even when the "cold" macro was chosen. This leads me to believe that I am improperly using WML, and making the same kinds of mistakes every time I get a "time area"-weapon-special to work. How can I change these weapon specials so that only one of the three time-area macros is activated by each of the three attacks?


2)I'm having a hard time making tooltips with LUA. I'm basically adding a second kind of "lawful/chaotic/neutral" affinity on top of the first, and I wanted know how to change the text on the right-side panel. Like with affinity every unit on the map will have an individual status, so I figured it would be worthwhile. I saw a good guide on how to add new statuses with LUA, but I'm still confused about editing text over there. Editing tooltips over each unit seems easier but I'm pretty nervous about that too.


3)Can Wesnoth's visuals keep up with multiplayer battles where time areas are being changed multiple times in one turn? I have only tested these macros in single-player scenarios, but the gui and the graphics seem to struggle with abrupt changes in the schedule unless of course you load the schedule before start like you're supposed to. Specifically, schedule changes/time areas made during or after turn 1 tend to not show on the right-hand panel.

If I stop representing time areas with unique RGB colors, it won't be a dealbreaker but I will need to make new icons/halos for the custom units and figure out how to make their use conditional upon entering/leaving/changing time areas. I don't want to go through that if I do in fact have this current option.


I still look forward to presenting some kind of UMC content, everything else I want to do is easier than this part so that's encouraging.
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

BUMP
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: I want to understand

Post by gfgtdf »

Rodrom wrote: 1}Currently, the macros interfere with each other. No matter which one my units use, all three are activated at the same time.
Not sure if i undrstood your question correctly, but one of the problems in your code is that [/filter_attacker] is no valid subtag of if and will thus be ignored. You can see a valid list of valdi if conditiional tags in https://wiki.wesnoth.org/ConditionalAct ... ition_Tags
Rodrom wrote:
2)I'm having a hard time making tooltips with LUA. I'm basically adding a second kind of "lawful/chaotic/neutral" affinity on top of the first, and I wanted know how to change the text on the right-side panel. Like with affinity every unit on the map will have an individual status, so I figured it would be worthwhile. I saw a good guide on how to add new statuses with LUA, but I'm still confused about editing text over there. Editing tooltips over each unit seems easier but I'm pretty nervous about that too.
Note sure, do you already know lua and just don't know how to add tooltips or do yo8u don't really know lua at all?
Rodrom wrote:

3)Can Wesnoth's visuals keep up with multiplayer battles where time areas are being changed multiple times in one turn? I have only tested these macros in single-player scenarios, but the gui and the graphics seem to struggle with abrupt changes in the schedule unless of course you load the schedule before start like you're supposed to. Specifically, schedule changes/time areas made during or after turn 1 tend to not show on the right-hand panel.
If it didn't work in sp then it won't work in mp neigher since generally the drawing code in mp and sp is the same.
If you think you font a problem tohugh you can fie a bug/fr in our bugtracker.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

Not sure if i undrstood your question correctly, but one of the problems in your code is that [/filter_attacker] is no valid subtag of if

Code: Select all

#textdomain wesnoth-The_Legend_Of_Buttheart

#   Weapon Special


#define WEAPON_SPECIAL_ARCANA_ACTIVATE_N
    [arcana_activate_n]
        id=TLOBH_arcana_activate_n
        name= _ "arcana activate"
        name_inactive=_ "inactive activate"
        description= _ "Changes the schedule based on the nature of the attacking unit, and may change stats as well."
        description_inactive=_ "This attack changes the unit's surroundings."
    [/arcana_activate_n] # wmlxgettext: [specials]
[/specials] # wmlxgettext: [attack]
[/attack]
[event]
    name=attacker hits
    first_time_only=no
		[if]
				 side=$side_number
					[filter_wml]
						[status]
							mild_climate=yes
						[/status]
					[/filter_wml]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=5
					  {AFTERNOON}
					[/time_area]
						{BASIC_SIGNAL}
				[/then]
		[/if]
[/event]
[+attack]
    [+specials]
        # wmlxgettext: [/specials]
        # wmlxgettext: [/attack]

#enddef



#define WEAPON_SPECIAL_ARCANA_ACTIVATE_P
    [arcana_activate_p]
        id=TLOBH_arcana_activate_p
        name= _ "arcana activate"
        name_inactive=_ "inactive activate"
        description= _ "Changes the schedule based on the nature of the attacking unit, and may change stats as well."
        description_inactive=_ "This attack changes the unit's surroundings."
    [/arcana_activate_p] # wmlxgettext: [specials]
[/specials] # wmlxgettext: [attack]
[/attack]

[event]
    name=attacker hits
    first_time_only=no
		[if]
				 side=$side_number
					[filter_wml]
						[status]
							cold_climate=yes
						[/status]
					[/filter_wml]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=5
					  {POLAR_AFTERNOON}
					[/time_area]
						{POLAR_SIGNAL}
				[/then]
		[/if]
[/event]
[+attack]
    [+specials]
        # wmlxgettext: [/specials]
        # wmlxgettext: [/attack]
		
#enddef



#define WEAPON_SPECIAL_ARCANA_ACTIVATE_S
    [arcana_activate_s]
        id=TLOBH_arcana_activate_s
        name= _ "arcana activate"
        name_inactive=_ "inactive activate"
        description= _ "Changes the schedule based on the nature of the attacking unit, and may change stats as well."
        description_inactive=_ "This attack changes the unit's surroundings."
    [/arcana_activate_s] # wmlxgettext: [specials]
[/specials] # wmlxgettext: [attack]
[/attack]

[event]
    name=attacker hits
    first_time_only=no
		[if]
				 side=$side_number
					[filter_wml]
						[status]
							warm_climate=yes
						[/status]
					[/filter_wml]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=5
					  {SOLAR_AFTERNOON}
					[/time_area]
						{SOLAR_SIGNAL}
				[/then]
		[/if]

[/event]

[+attack]
    [+specials]
        # wmlxgettext: [/specials]
        # wmlxgettext: [/attack]
		
#enddef
Okay got rid of tags, no change to the code's effect in-game (since the tags were doing nothing). It's possible that I just need a filter tag that selects units based on their unique WML so that different units only activate one weapon special out of the three. I'm not good with WML so I can't tell if I'm using the wrong filter tags or if filter tags just aren't meant to be used in this particular situation.


Note sure, do you already know lua and just don't know how to add tooltips or do yo8u don't really know lua at all?
Don't know LUA at all. I've been reading the tutorials for a while now but I don't understand it TBH. I'm working from the assumption that LUA tags are needed for changes in the GUI.


If you think you font a problem tough you can file a bug/fr in our bugtracker.
Got it.

Code: Select all

#textdomain wesnoth-The_Legend_Of_Buttheart

#ifdef Buttheart_Era

{~add-ons/Buttheart_Era/data}
{~add-ons/Ageless_Era/data}

[binary_path]
    path="data/add-ons/Buttheart_Era"
[/binary_path]
    
[+units]
	{~add-ons/Buttheart_Era/factions}
	{~add-ons/Buttheart_Era/macros}
	{~add-ons/Buttheart_Era/units/TLOBH_arcasters_units/}
        {~add-ons/Buttheart_Era/units/TLOBH_earthguild_units/}
        {~add-ons/Buttheart_Era/units/TLOBH_eternalforest_units/}
	{~add-ons/Buttheart_Era/units/TLOBH_fellmasons_units/}
        {~add-ons/Buttheart_Era/units/TLOBH_finalnorth_units/}
	{~add-ons/Buttheart_Era/units/TLOBH_ironnation_units/}
        {~add-ons/Buttheart_Era/units/TLOBH_khalifate_units/}
	{~add-ons/Buttheart_Era/units/TLOBH_thracian_units/}
	{~add-ons/Buttheart_Era/units/TLOBH_waterleague_units/}
	{~add-ons/Buttheart_Era/units/TLOBH_united_fire_units/}
	{~add-ons/Buttheart_Era/factions/TLOBH_factions.cfg}
	{~add-ons/Buttheart_Era/factions/TLOBH_AR_Arcasters.cfg}
        {~add-ons/Buttheart_Era/factions/TLOBH_EF_Eternal_Forest.cfg}
        {~add-ons/Buttheart_Era/factions/TLOBH_EG_Earth_Guild.cfg}
        {~add-ons/Buttheart_Era/factions/TLOBH_FM_Fellmasons.cfg}
        {~add-ons/Buttheart_Era/factions/TLOBH_FN_Final_North.cfg}
        {~add-ons/Buttheart_Era/factions/TLOBH_IN_Iron_Nation.cfg}
        {~add-ons/Buttheart_Era/factions/TLOBH_KF_Khalifate.cfg}
	{~add-ons/Buttheart_Era/factions/TLOBH_TE_Thracian_Empire.cfg}
	{~add-ons/Buttheart_Era/factions/TLOBH_UF_United_Fire.cfg}
	{~add-ons/Buttheart_Era/factions/TLOBH_WL_Water_Leagues.cfg}
[/units]

	[editor_times]
		name= _ "Default"
		id=default
		{DEFAULT_SCHEDULE}
	[/editor_times]
	
	[editor_times]
		name= _ "P_Default"
		id=polar
		{POLAR_SCHEDULE}
	[/editor_times]
	
	[editor_times]
		name= _ "S_Default"
		id=solar
		{SOLAR_SCHEDULE}
	[/editor_times]
	
#endif
The only issue I have not related to the weapon special is the multiplayer era I'm working on. I have a slightly different version of the Default Era that I want to test my custom units with. I'm having trouble getting the custom era to show in my multiplayer options. Do you simply have to edit the MP era's main.cfg file to get it to show or do you have to try something else? This is what I have so far, it doesn't look right but I can't see how it would prevent the era from loading.
Last edited by Rodrom on March 31st, 2017, 10:28 pm, edited 1 time in total.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: I want to understand

Post by gfgtdf »

Rodrom wrote: Okay got rid of tags, no change to the code's effect in-game (since the tags were doing nothing). It's possible that I just need a filter tag that selects units based on their unique WML so that different units only activate one weapon special out of the three. I'm not good with WML so I can't tell if I'm using the wrong filter tags or if filter tags just aren't meant to be used in this particular situation.
well now you have [filter_wml] which not an accepted tag in [if] ... .really the only accepted tag atre the ones in the link i put in my last post
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Rodrom
Posts: 41
Joined: March 4th, 2017, 7:00 am
Location: Reach me here: Orwell64123@gmail.com

Re: I want to understand

Post by Rodrom »

gfgtdf wrote:
well now you have [filter_wml] which not an accepted tag in [if] ... .really the only accepted tag atre the ones in the link i put in my last post[/quote]


I apologize. I need to do a better job remembering the more common sub-tags and when they are valid.

I'm hoping this is valid.

Code: Select all

[event]
    name=attacker hits
    first_time_only=no
		[if]
			[have_unit]	
				[abilities]
					[specials]
						id=TLOBH_arcana_activate_s
					[/specials]
				[/abilities]	
						[and]
							[variable]
								name=hot_climate
							[/variable]
						[/and]
			[/have_unit]
				[then]
					[time_area]
					  x,y=$unit.x,$unit.y
					  radius=6
					  {SOLAR_AFTERNOON}
					[/time_area]
						{SOLAR_SIGNAL}
				[/then]
					[else]
						{PALLID_SIGNAL}
					[/else]
		[/if]
[/event]
Post Reply