Alternate Levelling system

The place to post your WML questions and answers.

Moderator: Forum Moderators

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
fez_the_druid
Posts: 4
Joined: May 15th, 2012, 11:07 am

Alternate Levelling system

Post by fez_the_druid »

Hello!
I recently made a post in the factions and eras development forum and was told to come here to ask some questions so here goes!

If you haven't read my idea yet then here it is: I'm looking to make a faction of golems and there controlling artificers and some assistant blacksmiths. Seen as golems are essentially dumb mechanoids, they won't level up in the usual way but by combining their parts with other golems. The artificers, as well as being the faction leaders, would also be the golems healers or "mechanics" and the blacksmiths would provide temporary defence buffs to golems in the area.

My questions are these:
Is it possible to change the unit advancement conditions so that a unit could level up not from experience but in another way?
And can another unit affect the terrain defence temporarily of a particular unit?

Many Thanks,

Fez
User avatar
The_Other
Posts: 189
Joined: February 3rd, 2012, 10:05 pm
Location: UK

Re: Alternate Levelling system

Post by The_Other »

You can easily stop a unit from leveling-up through experience - in the unit file, write 'advances_to=null' and then DO NOT write {AMLA_DEFAULT} (or any other AMLA - I believe all normal units that can't advance have an AMLA defined for them, but there's no reason why they have to).
The other part, making the units 'stick together' into a more powerful form, is trickier but still can be done (not by me, though - I have no idea how to make it work properly!)
Nothing is true; everything is permissible.
User avatar
Xudo
Posts: 563
Joined: April 3rd, 2009, 5:26 pm

Re: Alternate Levelling system

Post by Xudo »

Where will those parts be stored?

If you want to make Unit C (2lvl) from unit A (1lvl) and unit B (1lvl), you have to do something like:
* Mark 2 adjacent tiles on the ground - resource sites. (Label/image/anything)
* Mark one tile, adjacent to the previous two, in other way - smith site.
* Make "[set_menu_item]" option for each "recipe" of transformation.
* In [command] statement you need to delete units on the resource sites, then place new unit on any of resource site.
User avatar
Substance_Thief
Posts: 5
Joined: May 18th, 2012, 4:32 am

Re: Alternate Levelling system

Post by Substance_Thief »

Post 1:

couldn't you use something similar to revel and ceres' fellowship of the clay code? Just changing it to make the combination permanent after right-click activation.


Post 2:

As far as heal you could redefine heal Ability to affect only unit type your golems not affect allies. advancement gain exp as normal only when full the advance only causes a minor change to sprite ie glowing eyes or something but same attributes in the cfg with an addendum allowing a fellowship of the clay combine ability. this way you will not have to have enviromentals all over the board.
base heal ability is located: data/core/macros/abilities
combination is located:addons/fellowship of the clay/utils/mounting- looks like dont store either unit and kill originals.

cool good luck
Last edited by Substance_Thief on May 18th, 2012, 4:37 pm, edited 2 times in total.
~gimps other peoples art while the family sleeps...
fez_the_druid
Posts: 4
Joined: May 15th, 2012, 11:07 am

Re: Alternate Levelling system

Post by fez_the_druid »

Right! I have been working on the code and it works for one of the golems so that's a good sign! :D now just got to get it working for the rest...
User avatar
Efinari
Posts: 103
Joined: January 25th, 2011, 3:07 am
Location: Grakvr Peak, Eastlands

Re: Alternate Levelling system

Post by Efinari »

I just wanted to add my two-cent's worth and say that this doesn't sound as daunting as many projects I've started (and a few I've completed--yes, that's me: vain braggart :P ). There are plenty of ways to incorporate the alternate leveling system; many of which do not involve [set_menu_item], if you are adverse to using that. One possible idea includes two units having a certain amount of experience and starting a turn next to each other (still using the experience on that one; but that's just one example). Anyway, I personally like both the sounds and chances of this project. Keep up the good work, Fez!

P.S.: For your second question, almost anything is possible to set abilities for. Besides the basic leadership skills, you can also use something like

Code: Select all

#define ABILITY_TEST
[dummy]
  id=ability_test
  name=_"test"
  description=_"Test:
A simple example."
[/dummy]
[/abilities]
[event]
# Just treat this like any old event....
[/event]
[+abilities]
#enddef
to do a whole myriad of different things.... :D
Kallin Efinari
---Creator of "LOTE Unit Release", "7p - Afterwards", and "Chain Lightning"
(Working on 1.12 port of "7p - Afterwards")
Managing compatibility between 4000K people's ideas of what happens? Forget it!
User avatar
Xudo
Posts: 563
Joined: April 3rd, 2009, 5:26 pm

Re: Alternate Levelling system

Post by Xudo »

I think that implementation via [set_menu_item] will be much more configurable and scalable.
Everything you need for adding one new transformation - is addition of one [set_menu_item]. You don't even need to modify existing units and\or abilities.
User avatar
Efinari
Posts: 103
Joined: January 25th, 2011, 3:07 am
Location: Grakvr Peak, Eastlands

Re: Alternate Levelling system

Post by Efinari »

xudojnik wrote:I think that implementation via [set_menu_item] will be much more configurable and scalable.
Everything you need for adding one new transformation - is addition of one [set_menu_item]. You don't even need to modify existing units and\or abilities.
Of course, it is completely up to the creators of this add-on. I personally tend to stay away from the [set_menu_item] feature because I feel it detracts somewhat from the 'Wesnoth' feel of it (as defined in 'Heir to the Throne' and unfortunately never quite re-captured--not to say there isn't some great stuff out there). But that's just my take on the matter (and I have used [set_menu_item] for a couple of my projects).
Kallin Efinari
---Creator of "LOTE Unit Release", "7p - Afterwards", and "Chain Lightning"
(Working on 1.12 port of "7p - Afterwards")
Managing compatibility between 4000K people's ideas of what happens? Forget it!
Post Reply