Search found 28 matches

by hyper_cubed
May 20th, 2018, 8:10 pm
Forum: WML Workshop
Topic: Include new units in a modification type mod
Replies: 1
Views: 253

Include new units in a modification type mod

I have an AMLA that seeks to fill gaps in a line on enemy death. It works but I am limited to passing unit types that already exist. I would like to partition a part of my mod directory to hold specific units that I include in the mod. Tried including a units folder and a [+units] tag in my main.cfg...
by hyper_cubed
April 27th, 2018, 9:18 pm
Forum: WML Workshop
Topic: Relative directional data
Replies: 2
Views: 327

Re: Relative directional data

I'm sure you are aware of this, but just in case: I would like to remind any readers that there exists [store_relative_direction] for versions 1.13 and greater. Wow, that is awesome. I was not aware of that. I started building what I was building because I wanted to create a rotate function that wo...
by hyper_cubed
April 27th, 2018, 4:26 pm
Forum: WML Workshop
Topic: Relative directional data
Replies: 2
Views: 327

Relative directional data

I am not sure if there is a better way to do this, but I created a macro that will tell you where the adjacent unit is in relation to the primary unit. I intend to create a 1.12 friendly rotation macro. I use this primarily for events, but I am sure it can be used for other things. As long as you ca...
by hyper_cubed
April 23rd, 2018, 2:23 am
Forum: WML Workshop
Topic: Terrain codes
Replies: 5
Views: 350

Re: Terrain codes

This is the script which created the wiki page, maybe you want to have a look: https://github.com/wesnoth/wesnoth/blob/master/data/tools/terrain2wiki.py EDIT: for some reason, it is double building the string. Gotta look into it, but almost done. Also the fail string isn't working all the way yet. ...
by hyper_cubed
April 23rd, 2018, 12:00 am
Forum: WML Workshop
Topic: Terrain codes
Replies: 5
Views: 350

Re: Terrain codes

You mean something like this ? This may not be suitable for everyone, but I intend to build a string builder that initializes variables so an individual can build terrain string definitions as needed. I will post my code later but in the mean time if it helps anybody, I built an array out of the in...
by hyper_cubed
April 22nd, 2018, 8:39 pm
Forum: WML Workshop
Topic: Terrain codes
Replies: 5
Views: 350

Re: Terrain codes

Pentarctagon wrote:
April 22nd, 2018, 7:46 pm
You mean something like this?
Doh,

now I feel dumb.
by hyper_cubed
April 22nd, 2018, 7:43 pm
Forum: WML Workshop
Topic: Terrain codes
Replies: 5
Views: 350

Terrain codes

Hey guys, does anyone have any precompiled lists of terrain codes? I work as a database developer and have very little time after work. I am about 3-5k lines into my mod and want to create a terrain resource I just don't have the time to list out all the possibilities. If anyone has a resource, coul...
by hyper_cubed
April 22nd, 2018, 7:40 pm
Forum: WML Workshop
Topic: Dynamically remove default amla from some unit_type
Replies: 9
Views: 608

Re: Dynamically remove default amla from some unit_type

A 1.12-friendly method to remove the default AMLA as an option would probably be something like the following (untested): [store_unit] # Whatever filter you want; should match only one unit, use a loop if you need more variable=my_unit [/store_unit] [clear_variable] variable=my_unit.advancement[0] ...
by hyper_cubed
April 22nd, 2018, 7:33 pm
Forum: WML Workshop
Topic: Advancement Effect apply_to=bonus_attack
Replies: 5
Views: 366

Re: Advancement Effect apply_to=bonus_attack

iirc dugis addons implementes this type of effect manually in postadvance etc events, although it could also be implemented via the new 1.13 custom effects. One important different between duigs implementation and a possible 1.13 custom effect implementation is that dugis implementatiojn makes sure...
by hyper_cubed
April 22nd, 2018, 7:23 pm
Forum: WML Workshop
Topic: Wesnoth formula language function "contains_string"
Replies: 5
Views: 430

Re: Wesnoth formula language function "contains_string"

If you are trying to filter units, you may want to make use of lua_function attribute in StandardUnitFilter . That one just needs to return true/false, so there's no need to store a WML variable. By the way, using Lua code as you have done is a nicer solution than using WFL because a variable subst...
by hyper_cubed
April 18th, 2018, 4:50 pm
Forum: WML Workshop
Topic: Dynamically remove default amla from some unit_type
Replies: 9
Views: 608

Re: Dynamically remove default amla from some unit_type

The Lua snippet I posted would be for removing (ie, undoing) an AMLA that has already been selected. For removing the default AMLA as an option, I'd suggest adopting the other approach I mentioned, which is to use an object something like this: [object] [effect] apply_to=remove_advancement amlas=am...
by hyper_cubed
April 18th, 2018, 4:47 pm
Forum: WML Workshop
Topic: Advancement Effect apply_to=bonus_attack
Replies: 5
Views: 366

Advancement Effect apply_to=bonus_attack

I was perusing through Dugi's codebase for legend of the invincibles and found an advancement called arrow storm. I would like to do something similar, and have already instantiated the weapon special, but there is something that I cannot account for. As I search the database for "bonus_attack" in t...
by hyper_cubed
April 18th, 2018, 4:42 pm
Forum: WML Workshop
Topic: Wesnoth formula language function "contains_string"
Replies: 5
Views: 430

Re: Wesnoth formula language function "contains_string"

In order to use WFL code in this context, you need to enclose the entire formula in parentheses. It's also strongly recommended to enclose the whole thing in double quotes, since not doing so will result in the + sign being parsed out by the WML, which means WFL will raise a syntax error. You don't...
by hyper_cubed
April 14th, 2018, 4:36 pm
Forum: WML Workshop
Topic: Wesnoth formula language function "contains_string"
Replies: 5
Views: 430

Wesnoth formula language function "contains_string"

I am attempting to utilize the WFL in my code, specifically the contain_string(string, search_string) function. Here is what I've got: [variable] name=lookup equals=$contains_string('[x]' where x = $attacks_array[$idx_1].id, '[y]' where y = $magic_list_array[{grp_idx}].name) [/variable] I'm not sure...
by hyper_cubed
April 9th, 2018, 12:52 pm
Forum: WML Workshop
Topic: Dynamically remove default amla from some unit_type
Replies: 9
Views: 608

Re: Dynamically remove default amla from some unit_type

In 1.13.x, it's a lot easier to manage advancements in this kind of way. For example, if you're working entirely in WML, you can use an [object] to add and remove advancements (though that won't be optimal if you're doing a lot of adding and removing and re-adding and stuff on particular units). If...