Plan_Your_Advancements (BfW 1.11/1.12)

It's not easy creating an entire faction or era. Post your work and collaborate in this forum.

Moderators: Forum Moderators, Developers

Plan_Your_Advancements (BfW 1.11/1.12)

Postby Anonymissimus » March 22nd, 2011, 9:45 pm

copied addon description:
Normally, in networked multiplayer, when a unit levels while it is not that player's turn who controls this unit, the advancement dialog is skipped even if there are more than one choices available.
This era works around this by providing a right-click menu usable previously to leveling while it is that player's turn. Only the host needs to have downloaded this era.

Very little era, created mainly to show that this works and since I was annoyed about my mage leveling to Silver Mage in Collosseum ;)

---
Well, wanted somehow to create an era too and now I had a nice idea.
Not quite polished yet, the dialog doesn't display any information about the units types that a unit can advance into (other than the name). Took only a few hours to make however.
The reason for the dialog being skipped is that the wesnoth engine architecture is incompatible with out-of-turn queries (the dialog showing while leveling after being attacked is such a query).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Anonymissimus
Developer
 
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Plan_Your_Advancements_Era (BfW 1.9)

Postby StDrake » March 23rd, 2011, 6:19 am

Not that anything, but there already was such an era, at least I can still find note of it for 1.6: http://units.wesnoth.org/1.6/C/era_defa ... ement.html
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
User avatar
StDrake
 
Posts: 997
Joined: July 21st, 2009, 6:50 am

Re: Plan_Your_Advancements_Era (BfW 1.9)

Postby Anonymissimus » March 23rd, 2011, 5:55 pm

It's still on the 1.6 addons server. Well, browsing the code I can see several problems, and it wouldn't work in 1.9 without major revision. Also, usage of lua allows for major simplification and improvements. (using lua_function= in SUF and lua dialog functionalities).

EDIT
Next version on the server. The decision can be changed and undone. Fixed a severe bug. Made the dialog nicer. As far as I can tell, covers the complete functionality of the mentioned PresetAdvancement era.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Anonymissimus
Developer
 
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Plan_Your_Advancements_Era (BfW 1.11/1.12)

Postby tekelili » July 9th, 2014, 4:47 pm

My add on World Conquest II (BfW 1.12 and BfW 1.10) has integrated a plan your advadcements option of its own... I was thinking not allow your [modidofication] in my [scenario] for more safety to users, but then I becomed to think is probable this modification won´t work anyway in a campaign and I am not sure if it handles well when scenarios use a [unit] tag to create units (are they detected by your add onn?). I am just asking because perhaps you could want indicate those possible lacks in add on description and that would save me work disallowing it to protect unwary users.

Your add on is a great idea btw, I had no clue about its existence when did a version of my own :)
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
tekelili
 
Posts: 1025
Joined: August 19th, 2009, 9:28 pm

Re: Plan_Your_Advancements_Era (BfW 1.11/1.12)

Postby Anonymissimus » July 9th, 2014, 11:58 pm

tekelili wrote:but then I becomed to think is probable this modification won´t work anyway in a campaign

It should. This modification is expected to be very compatible with almost anything I can imagine.
tekelili wrote: and I am not sure if it handles well when scenarios use a [unit] tag to create units (are they detected by your add onn?). I am just asking because perhaps you could want indicate those possible lacks in add on description and that would save me work disallowing it to protect unwary users.

It does not matter how units are created.
This mod only adds a menu item, which shows up for any unit that can level to 2 or more types, which sets the [unit]advances_to and stores the original advances_to in a variable named pya_original_advances_to in that unit's [variables] section, for the case of further modification or setting back to random.
Variables and custom event names use an addon-specific prefix, so I really don't know what collisions this could possibly cause.
For instance, some addon could decide to clear all variables in all units which would break this addon, but that is that addon's failure then...
The code isn't much too, and pretty straightforward I think. It's lua however. That was easier and quicker for me...it may not have a functual advantage though.
tekelili wrote:Your add on is a great idea btw, I had no clue about its existence when did a version of my own :)

Thanks.

Well, my addon was/is the first of this type on the 1.11/12 addon server, so I hope to win the "war" against redundant addons. :)

EDIT
Ah yes, there is a factual advantage of using lua. I recall that using the SUF's lua_function= did significantly simplify (or make possible) the filter for the menu item (that is, decide whether to display the menu item, based on whether there is a choice for the unit under the cursor).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Anonymissimus
Developer
 
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Plan_Your_Advancements_Era (BfW 1.11/1.12)

Postby tekelili » July 10th, 2014, 12:20 am

Anonymissimus wrote:
tekelili wrote:but then I becomed to think is probable this modification won´t work anyway in a campaign

It should. This modification is expected to be very compatible with almost anything I can imagine.


That is nice, I thought you could have problems with [modification] events only beign writing in 1st scenario of campaign (a bug also present in [era]). But if using lua can solve that, may be I should learn it... if I werent so lazy :oops:

I shouldnt have done a version for my add on (as is a poor wML code), but now I guess I will keep it just for little details in display design :|
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
tekelili
 
Posts: 1025
Joined: August 19th, 2009, 9:28 pm

Re: Plan_Your_Advancements_Era (BfW 1.11/1.12)

Postby Anonymissimus » July 10th, 2014, 12:27 am

tekelili wrote:That is nice, I thought you could have problems with [modification] events only beign writing in 1st scenario of campaign (a bug also present in [era]). But if using lua can solve that, may be I should learn it... if I werent so lazy :oops:

Just using lua certainly can't solve such thing sorry. If that's a bug with eras, it likely happens with mods as well. However, that's an engine bug then, and not an addon bug. If the engine bug gets fixed, it should work as I said.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Anonymissimus
Developer
 
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Plan_Your_Advancements (BfW 1.11/1.12)

Postby Ravana » March 1st, 2015, 9:59 pm

Would it be possible to have this [modification] include [checkbox] about whether the start [message] is displayed? This addons functionality is something I always expect to be available in my games and so for 1.10 included similar code directly, and now as dependency. However multiple small [message] tags require yet more clicks to start game.
User avatar
Ravana
Moderator
 
Posts: 1406
Joined: January 29th, 2012, 12:49 am
Location: Estonia

Re: Plan_Your_Advancements (BfW 1.11/1.12)

Postby tekelili » March 8th, 2015, 1:10 pm

I think usefulness of this [modification] is so universal that should be integrated in BfW engine. Is there any chance that happens in BfW 1.14?
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
tekelili
 
Posts: 1025
Joined: August 19th, 2009, 9:28 pm

Re: Plan_Your_Advancements (BfW 1.11/1.12)

Postby Anonymissimus » March 8th, 2015, 7:30 pm

Ravana wrote:Would it be possible to have this [modification] include [checkbox] about whether the start [message] is displayed?

Nice idea, thanks. It's on the server.
tekelili wrote:I think usefulness of this [modification] is so universal that should be integrated in BfW engine. Is there any chance that happens in BfW 1.14?

I imagine it could be done similar to the TURNS_OVER_ADVANTAGE macro included in the default eras.
Well, it should be tested thoroughly with 1.12, especially since there are zillions of possible combinations with other addons or eras. The functionality seems better compared with what was in 1.10 mostly (display only if there actually is a choice, setting back to random). The name "preset advancement" is better though, I was lacking a better idea back then. PYAM happened to be about the first modification, created weeks after the Mod feature was implemented in the 1.11 dev cycle.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Anonymissimus
Developer
 
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Plan_Your_Advancements (BfW 1.11/1.12)

Postby Ravana » August 17th, 2015, 10:39 pm

[command] of pya_help should have [allow_undo]. Interface action does not cause oos on undo.
User avatar
Ravana
Moderator
 
Posts: 1406
Joined: January 29th, 2012, 12:49 am
Location: Estonia


Return to Faction & Era Development

Who is online

Users browsing this forum: No registered users and 5 guests