Two separate veteran lists

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.
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Two separate veteran lists

Post by Szturmowiec »

Hello everyone,

I've got a question about a list for recalling veterans. The problem is that I'd like to have two separate lists in my campaign because for certain scenarios I want to use a different army. I can disable the posibility of recall and then I think I will be able to get it back, but how to choose which lists is enabled and which disabled while having two of them?

Thanks in advance fo all your help.
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Two separate veteran lists

Post by James_The_Invisible »

You can store the temporary gone units to a variable (with kill=yes) and when they return, you just unstore them to recall list (x,y=recall,recall).
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

Thank you so much! At first I just didn't understand kill properly and assumed that it means deleting the list, not making it inaccesible... So, if I now understand correctly, I can put my veterans into a variable and disable them by using kill=yes, then in the other sceario I can store an army in another variable and finally in a latter scenario when I use kill=yes for one of those variables, then the second one will be available?
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
skeptical_troll
Posts: 500
Joined: August 31st, 2015, 11:06 pm

Re: Two separate veteran lists

Post by skeptical_troll »

An alternative to the store/unstore method is to fiddle with the filter_recall tag of the leader(s). You can modify it depending on which units you want him to recall.
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

Thanks, but it'll take me some time before reaching this point. As for now, I need to finish work with second scenario and then create the third one before I'll need to separate veterans.
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Two separate veteran lists

Post by Bitron »

There is the save_id in the [side]-Tag. For example, if you have your first army, then you can define save_id=army1 and veterans get saved there from that scenario.
When you play with your second army in the second scenario, define save_id=army2 and they will get saved separately.
When using save_id=army1 in the third scenario, only veterans from the first scenario will be recallable. This is a good way if you always use one army per scenario.
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

WOW, that sounds easier than I thought! :shock: I could propably find it myself, but there's about zillion different commands, tags, etc. in the reference...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

Well, I used the save_id, but I've got another problem - despite using two separate armies for different scenarios, I want to use the same leader - the problem is that his exp isn't moved into the next scenario, but I want this to happen.
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Two separate veteran lists

Post by Samonella »

Szturmowiec wrote:Well, I used the save_id, but I've got another problem - despite using two separate armies for different scenarios, I want to use the same leader - the problem is that his exp isn't moved into the next scenario, but I want this to happen.
So the leader is being grouped with army1 but you don't want him to? I'd say to use [store_units] (with kill=yes like mentioned before) at the end of the first scenario to keep him separate.

In the next scenario, it sounds like the [side] includes type=, name=, etc, for the leader? I'd suggest taking out those lines and replacing them with no_leader=yes, so the game won't try to create a new unit as the side's leader. Then you can [unstore_unit] the original one.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

Well, that's not the end of my problems. I in the second scenario the leader still has no exp from the first one. As for the third one he appears with his exp, but in a recall list... Help :augh: :cry:
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Two separate veteran lists

Post by Samonella »

If he reappears in the third scenario, with his experience, he must have been saved with army1. The best way to prevent that is by somehow killing him before scenario 1 ends. As for still showing up without experience in the second one, hard to say what's going wrong.

Try this: make a [event]name=victory in scenario 1. In it, you can be sure that the leader gets stored and killed before the scenario actually ends. You should be able to see that he/she is missing before clicking 'End Scenario.' That also means that the unit in the variable you specify will definitely have the right amount of experience.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

1.I found out and fixed the disappearing experience bug.
2.I want him to be visible till the end...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Two separate veteran lists

Post by Samonella »

Szturmowiec wrote:I want him to be visible till the end...
Ah. Well, as far as I know, there's no way to kill him during/after linger mode (the time after scenario end but before you click 'End Scenario'). So if you keep him alive through that, you'll have to kill him some other time, before the player has a chance to see him in the scenario 3 recall list.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
Szturmowiec
Posts: 44
Joined: June 5th, 2017, 6:06 pm

Re: Two separate veteran lists

Post by Szturmowiec »

Samonella wrote:you'll have to kill him some other time, before the player has a chance to see him in the scenario 3 recall list
How? I tried to recall it in the prestart, then kill it, then unstore my leader, but it doesn't work...
That was the hell of a firefight. And the ammunition depleted so fast... I'm pinned down by those damned machine guns and don't know what to do next.
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Two separate veteran lists

Post by Samonella »

Szturmowiec wrote:How? I tried to recall it in the prestart, then kill it, then unstore my leader, but it doesn't work...
What exactly doesn't work? He just doesn't die? Hm, you shouldn't even need to recall him, you should just be able to [kill] based off his id or unit type.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Post Reply