Search found 1217 matches

by mattsc
October 28th, 2011, 11:07 pm
Forum: Coder’s Corner
Topic: Exercises in Formula and Lua AI and AI-demos add-on feedback
Replies: 472
Views: 133644

Re: Exercises in Lua AI: use of location_set

I am ready to dive deeper into Lua AI and am trying to wrap my head around the intended use of location_set. If I understand this right, I could implement my example of the Swamp Lurker moves using such sets. As a reminder, lurkers are dumb, impulse-drive creatures that move as follows: - They can m...
by mattsc
October 28th, 2011, 2:03 am
Forum: WML Workshop
Topic: 7thWolf's wml questions
Replies: 40
Views: 4571

Re: 7thWolf's wml questions

Yeah, I tried that, but couldn't get it to work. Is it not called like so: It is. I put this: [object] [filter] side=1 canrecruit=yes [/filter] [effect] apply_to=attack range=ranged [set_specials] {WEAPON_SPECIAL_MAGICAL} [/set_specials] [/effect] [/object] into my test scenario and it worked just ...
by mattsc
October 28th, 2011, 1:12 am
Forum: WML Workshop
Topic: questions and problems
Replies: 52
Views: 6235

Re: questions and problems

I don't know if this would work, but you could try [harm_unit] with a negative number of hitpoints. I don't know if that would work, but [harm_unit] is a 1.9 tag anyway. One of the most straight-forward ways of doing this (and the one Ceres was probably refering to) would be: - store unit, for exam...
by mattsc
October 27th, 2011, 7:35 pm
Forum: WML Workshop
Topic: 7thWolf's wml questions
Replies: 40
Views: 4571

Re: 7thWolf's wml questions

What I need is to add options to a [message] from the message's [command] tag..... but that isn't possible is it? Not as far as I know. Although, I guess what you posted would work, but there would be a limited amount of attacks it could apply to (which is better than nothing, though). I don't reme...
by mattsc
October 27th, 2011, 7:15 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Re: Larger font for all messages in a campaign

Ey, you're right, seems there's no way to force the engine to use no caption unless speaker is narrator... Oh, rats, didn't I write that? No, I forgot... I also tested with caption=" " (string consisting of a single space), and then you get no caption (or at least no visible caption) with...
by mattsc
October 27th, 2011, 6:04 pm
Forum: WML Workshop
Topic: 7thWolf's wml questions
Replies: 40
Views: 4571

Re: 7thWolf's wml questions

Okay, what about a [while] loop/tag (because isn't a FOREACH just a modified [while] loop? Also, I'm asking if they'll work within the [command] tag, within the [message] tag). @mattsc Sweet, thanks for the code! I'll probably be using it, if I can get this to work within a [command] tag, with in a...
by mattsc
October 27th, 2011, 5:55 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Re: Larger font for all messages in a campaign

What if the caller wants this wesnoth.wml_actions.message({ id = "the_valid_id_of_some_on_map_unit", caption = "" }) in which case your code would force him to use that unit's name (untested) ? I can confirm that that is the behavior. You could fix it by deleting the or caption ...
by mattsc
October 27th, 2011, 4:38 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Re: Larger font for all messages in a campaign

Very recently Gambit asked me about adding events from an addon in such way that they appear in every mainline/addon sp/mp scenario and said he got it to work. So I guess if you put the preload event or the lua code which loads this modifications of the [message] action handler outside of any campa...
by mattsc
October 27th, 2011, 4:27 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Re: Larger font for all messages in a campaign

Well, I had a look in the game code to see if I could find the default font size settings, and came across this: ... Thanks for all the information! I didn't get any suggestions for my code out of that, did I miss anything? What I wrote there really only affects the WML [message] tag, and nothing e...
by mattsc
October 27th, 2011, 3:14 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Re: Larger font for all messages in a campaign

Minor refinement suggestions: Can you add the default sizes as comments, and/or make them parameters which can be passed from main.cfg? That's a good idea, and an easy change. The new file is attached. You now call it from _main.cfg like this: [lua] code = << message_size, caption_size = 16, 20 wes...
by mattsc
October 27th, 2011, 2:13 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Re: Larger font for all messages in a campaign

If this works well, could it be added as a preference option in the game? mj: Somebody else will have to reply to that. I believe that the preference menu is written in C++ and cannot be modified by WML or Lua. The only thing you can do right now is add it to the right-click menu with [set_menu_ite...
by mattsc
October 27th, 2011, 3:58 am
Forum: WML Workshop
Topic: Where to start?
Replies: 77
Views: 9218

Re: Where to start?

I am progressing but very slowly now....am i being to thorough trying to test everything when I change it and also fiddling with every fine detail even if it is way beyond my ability?.... That's a question only you can answer. You could jump in, try to do things quickly, and learn as you need them....
by mattsc
October 27th, 2011, 3:49 am
Forum: WML Workshop
Topic: 7thWolf's wml questions
Replies: 40
Views: 4571

Re: 7thWolf's wml questions

2 - Is it possible (and if so, how) to create a menu for a unit's available attacks, have the user choose an attack, and then apply an object/effect to that attack? I know how you could loop through and create the menu, but I don't know how you'd apply the object based on the chosen attack (at leas...
by mattsc
October 26th, 2011, 11:51 pm
Forum: WML Workshop
Topic: Larger font for all messages in a campaign
Replies: 14
Views: 2394

Larger font for all messages in a campaign

Does anybody else ever get a headache because of the small font size when trying to read long dialogs on a high-res laptop screen? I've previously searched the forums and the web for this, but have never been able to find a method to change the font size for all messages. (I mean, of course one can ...
by mattsc
October 25th, 2011, 11:19 pm
Forum: WML Workshop
Topic: Where to start?
Replies: 77
Views: 9218

Re: Where to start?

I also think I have got the basics down thanks to this thread and all of your help but i will prob still have lots of stupid questions with things not working.....is there a UMC with good coding that you recomend downloading? (apart from ASC which i already have and still refer too) Personally, my ...