some issues brought up while making umc

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
homunculus
Posts: 537
Joined: July 21st, 2010, 9:47 pm

some issues brought up while making umc

Post by homunculus » September 2nd, 2010, 2:26 am

**** first, some questions.

1. can i show objectives when i want to?
i have a scenario that begins with a cut scene, and player side is controlled by ai for a little while.
i would like to show the objectives screen before the player gets control, but it seems that i can not.

2. is there a way to delay redraw?
so that when i place multiple images the redraw would not happen after placing each individual image.
i mean, so that the images would appear all at once.

**** and second, some issues which might be worth posting in technical support (i thought i should ask here first, maybe i have just done something wrong).

1. there is a glitch with images placed on the map and their removal.
i stored all locations on map and placed images in all locations to get a honeycomb.
when i stored all locations again and removed the images, the result was like this (please ignore the third unit appearing and disappearing, the third unit was not there in the other screenshot).
honeycomb.gif
honeycomb.gif (19.18 KiB) Viewed 929 times
it seems that is possible to place an image that you cannot remove later.

2. mountains combine nicely into larger mountains and ridges, but they combine differently in map editor and in the game.
also, village variations (or whatever they are called) look different in the map editor and in game.
now, when i want the cloudy impassable peaks to appear at the top of a 4 hex mountains or the larger mountain ridges, i need to do a lot of switching back and forth between map editor and game.
it looks as if the editor and the game have some coordinate offsets for determining the variations, or what?

**** and lastly, some wml reference update suggestions.
1. AiWML
reference says passive leader never attackes and never moves.
however, i certainly have seen a passive leader attacking in 1.8.

Code: Select all

		[ai]
			passive_leader=yes
			leader_aggression=0.5
		[/ai]
i mean, i am quite happy that i can have ai leader that does not leave the keep but still fights.
as far as i remember, passive leaders did not fight in 1.6, maybe the wml reference is outdated here.

2. DirectActionsWML
reference says reduce, but somehow shrink seems to work instead.

Code: Select all

		[replace_map]
			map="{~add-ons/Ruthless/maps/14_We_Trusted_You_2.map}"
#			reduce=yes
			shrink=yes
		[/replace_map]
also, when i replaced a larger map with a smaller one, the smaller map appeared as a postcard above the larger map.
i mean, the larger map was not erased from the background (actually i was happy with that for the purposes of a cutscene).
campaign ruthless in your nearest 1.11 add-on server
some wesnoth-related drawings

User avatar
krotop
2009 Map Contest Winner
Posts: 433
Joined: June 8th, 2006, 3:05 pm
Location: Bordeaux, France

Re: some issues brought up while making umc

Post by krotop » September 2nd, 2010, 7:23 am

homunculus wrote:1. can i show objectives when i want to?
i have a scenario that begins with a cut scene, and player side is controlled by ai for a little while.
i would like to show the objectives screen before the player gets control, but it seems that i can not.
You can show objectives whenever you trigger an event. If you use the [objectives] tag in the event "turn X", it will show the player's objectives at turn X, for instance (you may get more info from InterfaceActionsWML if you aren't used to custom objectives). I don't know, however, how or if it's even possible to get rid of the 1st turn's objective pop up.
Don't trust me, I'm just average player.
***
Game feedback for the Nightmares of Meloen
Art feedback by mystic x the unknown

User avatar
homunculus
Posts: 537
Joined: July 21st, 2010, 9:47 pm

Re: some issues brought up while making umc

Post by homunculus » September 2nd, 2010, 6:39 pm

krotop wrote:
homunculus wrote:1. can i show objectives when i want to?
i have a scenario that begins with a cut scene, and player side is controlled by ai for a little while.
i would like to show the objectives screen before the player gets control, but it seems that i can not.
You can show objectives whenever you trigger an event. If you use the [objectives] tag in the event "turn X", it will show the player's objectives at turn X, for instance (you may get more info from InterfaceActionsWML if you aren't used to custom objectives). I don't know, however, how or if it's even possible to get rid of the 1st turn's objective pop up.
ok, tested it again, but i don't think the question was understood.

Code: Select all

	[event]
		name=start
		[modify_side]
			side=1
			controller=ai
		[/modify_side]
	[/event]
	[event]
		name=side 1 turn 1
		[objectives]
			side=1
			[objective]
				condition=win
				description="Objectives are shown while player side is ai-controlled."
			[/objective]
			[objective]
				condition=lose
				description="Objectives are not shown while player side is ai-controlled."
			[/objective]
		[/objectives]
	[/event]
objectives, as far as i have managed to show them, only appear when human (player) gets control of the side, and player can start doing something.
what i have is player side (side 1) being ai-controlled for the first two turns of the scenario which is like a cut scene.
and i would like to show a real objectives screen to tease the player, rather than just having the same text in a narrator message (i know, the game will not break over it, but if it could be done, i would).
campaign ruthless in your nearest 1.11 add-on server
some wesnoth-related drawings

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: some issues brought up while making umc

Post by zookeeper » September 2nd, 2010, 6:49 pm

Well, does [show_objectives] work?

User avatar
homunculus
Posts: 537
Joined: July 21st, 2010, 9:47 pm

Re: some issues brought up while making umc

Post by homunculus » September 2nd, 2010, 7:47 pm

zookeeper wrote:Well, does [show_objectives] work?
[show_objectives]: (This feature was implemented in 1.7) refreshes the objectives defined by [objectives] and its [show_if] tags, and displays them. (It is also called whenever the user explicitly asks for the objectives; this matters only if the tag was overridden by a Lua script.)
* side: the side to show the objectives. If not set, all sides are used.
i think i might try some things:

Code: Select all

	[event]
		name=start
		[modify_side]
			side=1
			controller=ai
		[/modify_side]
	[/event]
	[event]
		name=side 1 turn 1
		[objectives]
........................................
		[/objectives]
		[show_objectives]
			side=1
		[/show_objectives]
	[/event]
the objectives did not show.

Code: Select all

	[event]
		name=start
#		[modify_side]
#			side=1
#			controller=ai
#		[/modify_side]
	[/event]
	[event]
		name=side 1 turn 1
		[objectives]
........................................
		[/objectives]
		[show_objectives]
			side=1
		[/show_objectives]
		[end_turn]
		[/end_turn]
	[/event]
the objectives did not show.

unless i am still doing something wrong, it seems indeed that the game must be waiting for player input for objectives to show.
unless there is some completely different way of forcing it (hmm.. what is this 'lua script', i wonder if that might be something to look into).
campaign ruthless in your nearest 1.11 add-on server
some wesnoth-related drawings

monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: some issues brought up while making umc

Post by monochromatic » September 2nd, 2010, 7:54 pm

Try:

Code: Select all

	[event]
		name=start
		[modify_side]
			side=1
			controller=ai
		[/modify_side]
		[show_objectives]
			side=1
         [objective]
            # objectives here, no [objectives] tag
         [/objective]
		[/show_objectives]
	[/event]
The wiki gave me the impression that it should have been coded this way.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: some issues brought up while making umc

Post by zookeeper » September 2nd, 2010, 8:31 pm

elvish_sovereign wrote:The wiki gave me the impression that it should have been coded this way.
No, it doesn't take any subtags. It just shows the objectives most recently set by [objectives].

Anyway, it's entirely possible that objectives can't be shown outside of the player's turn.

User avatar
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

Re: some issues brought up while making umc

Post by boru » September 2nd, 2010, 11:11 pm

I would try this:

Code: Select all

   [event]
      name=start
      [objectives]
         side=1
         [objective]
            condition=win
            description="Objectives are shown while player side is ai-controlled."
         [/objective]
         [objective]
            condition=lose
            description="Objectives are not shown while player side is ai-controlled."
         [/objective]
      [/objectives]
   [/event]
   [event]
      name=side 1 turn 1
      [modify_side]
         side=1
         controller=ai
      [/modify_side]
   [/event]
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.

User avatar
homunculus
Posts: 537
Joined: July 21st, 2010, 9:47 pm

Re: some issues brought up while making umc

Post by homunculus » September 9th, 2010, 3:35 am

elvish_sovereign wrote:...........
[show_objectives]
side=1
[objective]
..........
it seems to me that you have messed up the [objectives] and [show_objectives] tags.
boru wrote:I would try this:[...]
i am afraid it wouldn't work, it must have been one of the first things i tried.
i don't think i would test it atm, though, because atm side 1 is not controlled by ai at all, but [end_turn] is used instead, and the thing looks like:

Code: Select all

start: try to show objectives
side 1 turn 1: end turn
which should be equivalent to the suggestion, and the objectives are not shown.

anyway, as far as i remember, i kind of spent several hours trying to display those cursed objectives.
not that i needed it so badly, but because it felt like i was almost there.
whatever.

a more interesting question would be: is preload event known to be fishy, or should i experiment more with it?
campaign ruthless in your nearest 1.11 add-on server
some wesnoth-related drawings

Post Reply