Search found 59 matches

by Jovycos
September 3rd, 2011, 8:10 pm
Forum: WML Workshop
Topic: Purpose of [object]
Replies: 9
Views: 1041

Re: Purpose of [object]

@Elvish_Hunter That does not help. unit-utils.cfg: #define ADVANCE_UNIT FILTER ID_STRING [modify_unit] [filter] {FILTER} [/filter] type={ID_STRING} [/modify_unit] #enddef And I do not want to remove all objects It seems to work with modifying unit.__cfg (remove objects there) and then calling wesnot...
by Jovycos
September 3rd, 2011, 11:00 am
Forum: WML Workshop
Topic: Purpose of [object]
Replies: 9
Views: 1041

Re: Purpose of [object]

How to tell a unit to level up to itself? Encapsulating all modifications in objects is reasonable in my opinion. I want to avoid undo-information, that is complicated and error-prone.

PS:
wesnoth.transform_unit?
by Jovycos
September 3rd, 2011, 1:39 am
Forum: WML Workshop
Topic: Purpose of [object]
Replies: 9
Views: 1041

Re: Purpose of [object]

Okay, I have written a Lua script “reassembling” a unit, it removes everything except of temporary data (x, y, moves, hitpoints, attacks_left, experience, status, variables), basic data which should not be changed by effects (type, gender, variation, id, underlying_id, name, side) and modifications....
by Jovycos
September 3rd, 2011, 12:21 am
Forum: WML Workshop
Topic: Purpose of [object]
Replies: 9
Views: 1041

Purpose of [object]

Hi!

I just wondered why there is the [object] tag in Wesnoth. It sounds like a tag for handling all changes made to the unit, but they cannot be removed, so, why aren't there simply direct changes instead of [object]s in the [modifications]-section?

Regards
by Jovycos
July 25th, 2010, 10:15 pm
Forum: Ideas
Topic: Being able to use the Mermen in skirmish and multiplay modes
Replies: 6
Views: 763

Re: Being able to use the Mermen in skirmish and multiplay m

I guess there is an era containing such a faction somewhere.
If you can‘t find it: Look for few extra units from XYZ such that the mermen have a respectable number of units and create an era yourself, that is really easy.

I like mermen, too. :-)
by Jovycos
July 25th, 2010, 10:05 pm
Forum: Ideas
Topic: Wesnoth should be able to selectively load add-ons
Replies: 8
Views: 796

Re: Wesnoth should be able to selectively load add-ons

I have got two ~-folders, one for development with very few addons and one with all the great addons I know for playing…
Disabling/enabling should be really implemented, "profiles" would be a nice extra, defined sets of enabled addons (+maybe other options, e.g. the design, nick name, debug mode…).
by Jovycos
July 25th, 2010, 2:07 pm
Forum: WML Workshop
Topic: Abilities: Update of filters
Replies: 2
Views: 245

Re: Abilities: Updte of filters

Thanks…
by Jovycos
July 25th, 2010, 1:22 pm
Forum: WML Workshop
Topic: Abilities: Update of filters
Replies: 2
Views: 245

Abilities: Update of filters

Hi!

I have noticed that ability/special-filters are updated quite often (by dumping messages from Lua), but when does it exactly happen?

Regards
by Jovycos
July 11th, 2010, 10:14 pm
Forum: WML Workshop
Topic: object has no effect
Replies: 5
Views: 389

Re: object has no effect

No, the real world is more complicate, I have got a filter and it has to be updated regularly, at least for specials that is the case, that is why I’m asking for abilities…
by Jovycos
July 11th, 2010, 10:00 pm
Forum: WML Workshop
Topic: object has no effect
Replies: 5
Views: 389

Re: object has no effect

And the effect won’t be updated regularly? But an ability should work, right?

Btw: Where can I see the image of the object in the game?
by Jovycos
July 11th, 2010, 9:31 pm
Forum: WML Workshop
Topic: object has no effect
Replies: 5
Views: 389

object has no effect

Hi!

When I add this Object to the modifications-list of a unit from Lua nothing happens:

Code: Select all

{'object',
    {'effect', {apply_to='movement', set='0'}}}
What could be the problem?

Regards
Jovycos
by Jovycos
June 24th, 2010, 10:59 pm
Forum: WML Workshop
Topic: Get the movement_type
Replies: 8
Views: 600

Re: Get the movement_type

@Anonymissimus
Well, Lua is not that difficult if you have got experiences with some other languages.
by Jovycos
June 24th, 2010, 10:16 pm
Forum: WML Workshop
Topic: Get the movement_type
Replies: 8
Views: 600

Re: Get the movement_type

Oh, thanks for correcting that. I had not yet tested it and simply wanted to share my approach.
I want to get the movement-type, because it can be used as an indicator how "strong" a unit is.
I am not interested in the concrete values.
by Jovycos
June 24th, 2010, 9:48 pm
Forum: WML Workshop
Topic: Get the movement_type
Replies: 8
Views: 600

Re: Get the movement_type

Okay, thanks, I will try that:

Code: Select all

function get_movement_type(unit)
  local type = unit.type
  if type == nil then
    return nil
  else
    return wesnoth.get_unit_type(unit.type).movement_type
  end
end
Thanks.
by Jovycos
June 24th, 2010, 7:42 pm
Forum: WML Workshop
Topic: Get the movement_type
Replies: 8
Views: 600

Get the movement_type

Hi!

I would like to get the movement_type of a unit from WML/Lua.
But unfortunately it seems not to be stored in the units.
How can I receive it? Do I have to get the unit_type and can I access the movement_type there? How to get the unit_type?

Regards
Jovycos