EarthCake's problems

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.
Post Reply
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: EarthCake's problems

Post by Ravana »

[option] and [kill].
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

Ravana wrote: May 1st, 2019, 5:09 pm [option] and [kill].
Thanks.

Is there any way to change map in middle of scenario?
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: EarthCake's problems

Post by Ravana »

[replace_map]
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

Should I then again use [event] name=prestart [/event] for units, if I want to place them?

EDIT: If I want to make option which leads to another map, I need: [option] [label] ... [/label] [then] [replace_map] map_data=... [/replace_map] [/then] [/option], and if choose other option, then [else] ... [/else]?
User avatar
Ravana
Forum Moderator
Posts: 3004
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: EarthCake's problems

Post by Ravana »

I do not understand first question.

No [then]/[else], use [option] for all choices. You might not want [label].
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

If I don't use 'scenario' in the map editor and I put units by [unit] tags, do I use again:

Code: Select all

[event]
	name=start
	[unit]
		type=Spearman
		x,y=(ie)1,1
	[/unit]
[/event]
Or I need to put units into map editor?
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: EarthCake's problems

Post by octalot »

Instead of replacing the map, you could go to a different scenario with

Code: Select all

  [endlevel]
    result=victory
    next_scenario=06_you_ally_with_the_necromancer_and_the_elves_leave_you_lost_in_the_forest
  [/endlevel]
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

It is dialogue only scenario, so it is not scenario end. Anyway, thanks now I know how to do what you suggested. :)
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

Is it possible to put an [event] tag inside [option] tag?
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

When it comes to map replacing, it says

replace_map: Map dimension(s) decrease but shrink is not set.

How do I repair this?
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: EarthCake's problems

Post by octalot »

Add shrink=yes. There's documentation and caveats on the Wiki: DirectActionsWML#.5Breplace_map.5D. For this tag, moving villages needs additional work.

You can also use the mainline campaigns for reference. Example:

Code: Select all

                [replace_map]
                    map="{campaigns/Descent_Into_Darkness/maps/12a_Endless_Night.map}"
                    expand=yes
                    shrink=yes
                [/replace_map]
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

After command [replace_map] is executed, map only turns black, but menu and gold, vills, and everything else can be seen. Is this error in WML, or some bug with map?
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: EarthCake's problems

Post by octalot »

Please attach the files for someone else to test it.
User avatar
EarthCake
Posts: 377
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: EarthCake's problems

Post by EarthCake »

Here it is. I changed leaders to be common units to not put here all that units files.
_main.cfg
(2.05 KiB) Downloaded 147 times
05_Things_to_do.cfg
(4.44 KiB) Downloaded 154 times
05_Things_to_do_b.map
(893 Bytes) Downloaded 152 times
05_Things_to_do_a.map
(468 Bytes) Downloaded 140 times
Smok
Posts: 53
Joined: June 14th, 2016, 11:52 am

Re: EarthCake's problems

Post by Smok »

It's not map_data, but just map (or map_file).
Post Reply