Just starting, some help pls? :)

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
Peixo
Posts: 3
Joined: January 19th, 2019, 2:39 pm

Just starting, some help pls? :)

Post by Peixo »

Hello,

I'm starting my first campaign, and i have a small problem that i don't know how to solve.

I want that the players can choose as leader between some Orc lvl1 units. I've done a small trick, so i can use the lvl1 leaders to test the first map and balance it (so far so good). I've modified a small era default+something, and changed the faction to be able to choose the leaders that i want. Then, i choose myself that era before loading the map and use the faction.

From here i'm a bit lost. Obviously i don't want that the players have to select it this way, so if with some lines i can set which leaders are available for the players it would be great. But i don't know why i think it's not going to be so easy :lol: :lol:.

Maybe i just should add the era to the campaign and then i can force the players to use that faction without locking the leader? As i said, i'm really lost, everything is really new for me.

I hope you can help me :)

Thanks anyways guys.
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Just starting, some help pls? :)

Post by octalot »

How about a dialog box like the one at the start of the tutorial?

It's written in Lua (so a second language to get used to), but you could copy and edit the tutorial's character_selection.lua. That's plumbed in to the campaign in the _main.cfg, and then used in the first scenario's start event by the code

Code: Select all

[select_character][/select_character]
.
Peixo
Posts: 3
Joined: January 19th, 2019, 2:39 pm

Re: Just starting, some help pls? :)

Post by Peixo »

Thank you for answering so fast.

I've seen that some campaigns use Lua as WML on the same time, but i thought that only one language was enough haha.

Ok, i will have a look this evening and let you know if i fixed it. :)
Peixo
Posts: 3
Joined: January 19th, 2019, 2:39 pm

Re: Just starting, some help pls? :)

Post by Peixo »

I've had a fast look to the tutorial and how it works. it could be, but this gives you the chance to choice but when you are already in the map, i would prefer in the screen before the game. It's a solution but for now (and for me haha) it's a bit difficult for me, i would like to try to find something easier before, if not i will try this one.

It could be great as you can do recruit=unit,unit,unit,.. for recruiting list and type=unit for stablishing a leader, that you could do something like type=unit,unit,unit so you have to choose between 3 different leaders.

I'm going to keep working in the rest, beacuse i feel like i'm going to get stuck in this for a while so i'll leave it for the end.
User avatar
WhiteWolf
Forum Moderator
Posts: 769
Joined: September 22nd, 2009, 7:48 pm
Location: Hungary

Re: Just starting, some help pls? :)

Post by WhiteWolf »

Peixo wrote: January 24th, 2019, 5:29 pm this gives you the chance to choice but when you are already in the map, i would prefer in the screen before the game.
What you could do to make the choice appear before the game loads, is use OptionWML in your [campaign] tag with [choice]'s. It's easy and appears in the main menu, right after the difficulty selection dialogue.
The downside is that I think it's not possible (but I might be wrong, I never actually tried this, so someone correct me if I am) to attach images. So it's just a selectable text. As long as all choices are mainline units, I don't think it's a problem, but if you include custom units from your campaign, then a provided description of them before the selection is cool for the player I think. And the best place for that is after the game has loaded, so with [select_character].
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Post Reply